Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1049624pxb; Wed, 6 Apr 2022 07:32:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkdiHdZg2jqTUcX6pRFjLAS6R8h0gFipBIeolisLC047KbfPUEQ0SmA4PjKb9arLUESfrx X-Received: by 2002:a63:c144:0:b0:399:3e75:1d55 with SMTP id p4-20020a63c144000000b003993e751d55mr7280471pgi.199.1649255555692; Wed, 06 Apr 2022 07:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649255555; cv=none; d=google.com; s=arc-20160816; b=E9RtFeGM/4l9GvFuTq1fNZJFb9bJBNsGzPJ3XpDtCoGMSlpQB16pBChY0YnArhfpen gU70Ez3sthhyXc76lnkv7D6J+bmYV9x3mk5Yrio2FlDFjxFdiPjC3tW7XM1YGEYOQv29 lTfotmYYCoM4T7qwDbo8SbD4YRg/aMtYBnpzb+iPK0Jb1Pn8uPuxtlPIM0fyBRYmpZo0 u4gqcztgIXwheLAfly/nSPOTaKfiTD3ur0AOsEF4YspyPa9SMBtEZcUOT+tUzTgoTL1p DhEjfUPTyF43O+4O+y7X6T0jU934Mh1p/kDV/M5uf0nAPQ1YvgDa52VxqO3Xt0PPL/qR upJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PPH5I7lo9bad4qDwHp9teAyaAq91XJ9oAjeIl8o+lsk=; b=xFuks+lIbPuETEFhNapm5t5WUEzo8t9WYUC7cxhRCufg+DD4dEkt6PoN/b6Dm2fAsX l1Vg7+ZhefiSNKRw+ZNPeU+tXp5I0Hb5IwBeEw4ItCQ03jo4tHdcRD/3LSs5vCwQX42O euu3q4RO42Nb59fK9AX9UtiB7ZutJcOmoTVRdhzrEjynnYd5EKpIERstlxVK8dydb+zQ FMTxFZ1KKXjFVL4iRN0LBf+u4mdnv0AMum7H+8XJLUVWPJzyIbAeXZFa081PAOYIpvMh QUYW7QyELWnMhsqAQaubiLq+l14YPFdRI24HpSuGzh/DA4gZ5MPYrrIGQ456K2mD/4H9 iyQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j4-20020a056a00174400b004fdbf2d9b58si17142639pfc.34.2022.04.06.07.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:32:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70BA5582C4C; Wed, 6 Apr 2022 05:13:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232066AbiDFMPf (ORCPT + 99 others); Wed, 6 Apr 2022 08:15:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231726AbiDFMOI (ORCPT ); Wed, 6 Apr 2022 08:14:08 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B45411AEC9F; Wed, 6 Apr 2022 00:56:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0V9KyhrA_1649231785; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V9KyhrA_1649231785) by smtp.aliyun-inc.com(127.0.0.1); Wed, 06 Apr 2022 15:56:26 +0800 From: Jeffle Xu To: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com, tianzichen@kuaishou.com, fannaihao@baidu.com Subject: [PATCH v8 08/20] erofs: make erofs_map_blocks() generally available Date: Wed, 6 Apr 2022 15:56:00 +0800 Message-Id: <20220406075612.60298-9-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220406075612.60298-1-jefflexu@linux.alibaba.com> References: <20220406075612.60298-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... so that it can be used in the following introduced fscache mode. Signed-off-by: Jeffle Xu --- fs/erofs/data.c | 4 ++-- fs/erofs/internal.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c index 780db1e5f4b7..bc22642358ec 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -110,8 +110,8 @@ static int erofs_map_blocks_flatmode(struct inode *inode, return 0; } -static int erofs_map_blocks(struct inode *inode, - struct erofs_map_blocks *map, int flags) +int erofs_map_blocks(struct inode *inode, + struct erofs_map_blocks *map, int flags) { struct super_block *sb = inode->i_sb; struct erofs_inode *vi = EROFS_I(inode); diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 5298c4ee277d..fe9564e5091e 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -486,6 +486,8 @@ void *erofs_read_metabuf(struct erofs_buf *buf, struct super_block *sb, int erofs_map_dev(struct super_block *sb, struct erofs_map_dev *dev); int erofs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len); +int erofs_map_blocks(struct inode *inode, + struct erofs_map_blocks *map, int flags); /* inode.c */ static inline unsigned long erofs_inode_hash(erofs_nid_t nid) -- 2.27.0