Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp311248pxb; Thu, 31 Mar 2022 06:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTqJNXuyE7s9cdf5b0lPFteEp3not1MIduT4d3lQ42eeFhwWeJyY8IZUBU+7qkSMH6j8s9 X-Received: by 2002:a17:907:a422:b0:6e0:238c:4f44 with SMTP id sg34-20020a170907a42200b006e0238c4f44mr4802042ejc.257.1648732063749; Thu, 31 Mar 2022 06:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648732063; cv=none; d=google.com; s=arc-20160816; b=b4DT0ArHTdjigfOxobpUblGIF2JCbAdMP9GG/PKkEqqo+bshC8RZ9SqRWsVfeRo8Ag 7HHorD5Gfao2sLeWt19ZLN/N28fOXygUZZ2Si5Yl+CuFLQJalCuh5QTd2Y7MI8ZWlNgp tifXCzxeDudctEVfvlvPWMYQrPZLvJQ3NTye7BD8T4Ai777XPOF+t1ybo4sakTDV+D4H Qq4Q8XSaPEyex1mmGmUctkxVZRi1XELggmKwF8qZteF7nI1PTNT7/I/PMB94xHQWL2L2 2XSvL/TyTe2MfCtwb6T11XiW01XG32L7qdbflLPX6mfHymzbYpcFze0QNLihGyUef/lH AMFg== 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=0KIkdtht/jkPT+Xgb2loz68v9WwyBCtXaZ5jnFBclS55lj+Z+brTfDJs+xEQCx32Lh C6TN+xNIVTIUGhclgAeLbnyEBhusKxEJrobZjWtdnaxLO0YJtUGy7RYY2YQ1/IhWOtGf XN4ta46r6Ae3AixfZWn/OMlVyDS6lcZ/oKaxeGfZgNFBbE18JERomguvQI/w6tYIGASC TW0AMpCXarDWp06WKAkSdqtj8ZEG6kchmax9caIBOtvTQoQBVGJcn1m7qXBmBFehvgy2 Mg/u5NsKKzFAXMmW7peZIhbWuzrriT40LLEenm8ysLRPIG4hV2nUcX95xTFivIfeECx+ WItg== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a50e00f000000b00418c2b5bd97si25634563edl.121.2022.03.31.06.07.16; Thu, 31 Mar 2022 06:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234426AbiCaMAc (ORCPT + 99 others); Thu, 31 Mar 2022 08:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235418AbiCaMAR (ORCPT ); Thu, 31 Mar 2022 08:00:17 -0400 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C5C208C28; Thu, 31 Mar 2022 04:58:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0V8iqyEU_1648727884; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V8iqyEU_1648727884) by smtp.aliyun-inc.com(127.0.0.1); Thu, 31 Mar 2022 19:58:05 +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 v7 07/19] erofs: make erofs_map_blocks() generally available Date: Thu, 31 Mar 2022 19:57:41 +0800 Message-Id: <20220331115753.89431-8-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220331115753.89431-1-jefflexu@linux.alibaba.com> References: <20220331115753.89431-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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