Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4865785iob; Mon, 9 May 2022 03:33:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyvgEWBbe06SpqIGJ885hc4wUKWAZS3/Uf5tC3nnT2VWNs06xIKxTMscJ4/d2ip96JoEyz X-Received: by 2002:a17:902:db82:b0:15d:356:8884 with SMTP id m2-20020a170902db8200b0015d03568884mr15934241pld.2.1652092405832; Mon, 09 May 2022 03:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652092405; cv=none; d=google.com; s=arc-20160816; b=ZtmrSiOcNBPEUwYcjlQVJfAFgX+940GKMYInVBTwDaDy+he7HGVXS7tJ3NOD80U2LA pItEJ46HGtFf0kmy8ZQjil+utStWyL3IDYi2v/FSHfyNPgcGrs2oYEZP+JJz6grnnz7A ThnSsAtRmYLbfxFDrSF1me3aqEt4OHpaibLkK1b8CWICLde7SqBW1ZjRVC3UNkru/9dZ AXwXXTjVrZndLg47t/MuStuKD2E795IzA0G+/6QUvh7YFZvszmSu4aeP6moRONzDfVmu AGmr6GzZgBdCedn+JIdDsE+rxBQbfsa5e0173pdTgKp3JQDYF6twiHDzpW6kpKnNQ0yd lzcw== 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=lR0PskUayF17AKxKzIAevrGeb+C2wVcauZf4nFb09UY=; b=Fzr9+Tuv6iQV1a15sIKzQpIzxcPzgV8EAoCoxzQ9Swcm3hoQbvusipq9MP5ykgqumi MHj9RnMDnmAwUpJP1qY7Dcbzd5d6MUe5OypiVx8BDCHO0OtVah/SV7vH6fZhpR0uCCNm srup+6VjAzlltw1YEbNjbbsuFpZ+fIItUvbdnkBEcVNfktp/LDF51FX50SzD0PKSpM+S I2OhIovhkRUg93Z3yNlnv3TD655bKuTo1L9HUEySZdX76q59ngXG0jxSvVsF+4gElaWO UCUtnNNGr8Ej4/CXSWAPW8NSUEb5qJMH0I0nxbA09VrSfbwJlImp9BGed7bTj0V2LbKd YKVw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id t4-20020a17090340c400b0015ee6096fadsi11566431pld.69.2022.05.09.03.33.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:33:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C347259FAD; Mon, 9 May 2022 03:03:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236884AbiEIHy3 (ORCPT + 99 others); Mon, 9 May 2022 03:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235011AbiEIHoy (ORCPT ); Mon, 9 May 2022 03:44:54 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7981B183BD; Mon, 9 May 2022 00:40:59 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VCgX6ia_1652082043; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VCgX6ia_1652082043) by smtp.aliyun-inc.com(127.0.0.1); Mon, 09 May 2022 15:40:44 +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, yinxin.x@bytedance.com, zhangjiachen.jaycee@bytedance.com, zhujia.zj@bytedance.com Subject: [PATCH v11 09/22] erofs: make erofs_map_blocks() generally available Date: Mon, 9 May 2022 15:40:15 +0800 Message-Id: <20220509074028.74954-10-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220509074028.74954-1-jefflexu@linux.alibaba.com> References: <20220509074028.74954-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 Reviewed-by: Gao Xiang --- 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