Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3345059ioa; Tue, 26 Apr 2022 01:41:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQyk0eL/ObQRfjVtgrcA5jdnNE8VhPzhsaXElcorHILdkzr8x01i2k7KnHOJT3qnKr+qTE X-Received: by 2002:a17:906:9b93:b0:6da:6388:dc57 with SMTP id dd19-20020a1709069b9300b006da6388dc57mr19862490ejc.338.1650962462959; Tue, 26 Apr 2022 01:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650962462; cv=none; d=google.com; s=arc-20160816; b=HR1f9uBpf7nOdhLFm5o0mvcbGeWmGNzrVcjAiJzNNn974YcT+tMvlUvnFfldU2TDTT ySDnZzisRjENjK2CYTqdBP+YR8IsUT9VwaFGZrVtWFVv+Uhi/kEMyj72dOkuCKm09l6q cfAkUCcuiPQyAKT6v5k74+EhM7SYtjjg32ZXn1YNsEqE8XOyYrWZpKOgopxjbKYj4y4k zdLIocgsLiD0NMtm7dKs8CLwDjrBaHaonrz7xm5hBNAMHD2tEvfU1On1XC4nKX25Bhmy kp1cKkah1zPs/fBvOLbpAWr7Cr+5QNVS+81JUr+K5id+V1Tt/asUH5tgHxUVDJxRk8pP n8xA== 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=t3iC6kSxT7474F8lboe+GsEfi9Uqb20Lpj/hl3XazwdXVLsEOdDxMWg6nuoYeFqZh+ UePedC7TJ74c7mMSpM968O75btco54PujldmkNFiDpNyVqqkfsZwtJyr5oANgvWQpmVI MfvHVCxbzluUlwNwSs/3zPzP4FH1y4ccby0/wJddEQILkUkPgvkVo6WYvRwGhmmrEubT 8wOO0n37HkIpkus105NY7nYBlIw9tZkeA+uhF8KZiliQ6wTGos9W2TydoIEuIvGG8Qu4 hWnrLpj+2n9E3nNLY04/jj3zKBJSY8jsQA8bikSVtemzjtUQHQewvh5CeRQMUJxCdGyb B9VQ== 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 q25-20020a170906389900b006e86e8d7520si14110314ejd.186.2022.04.26.01.40.37; Tue, 26 Apr 2022 01:41:02 -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 S238571AbiDYM03 (ORCPT + 99 others); Mon, 25 Apr 2022 08:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240831AbiDYMZR (ORCPT ); Mon, 25 Apr 2022 08:25:17 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946D560D89; Mon, 25 Apr 2022 05:22:03 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;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=20;SR=0;TI=SMTPD_---0VBDlJGB_1650889318; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VBDlJGB_1650889318) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Apr 2022 20:21:59 +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, zhangjiachen.jaycee@bytedance.com, zhujia.zj@bytedance.com Subject: [PATCH v10 09/21] erofs: make erofs_map_blocks() generally available Date: Mon, 25 Apr 2022 20:21:31 +0800 Message-Id: <20220425122143.56815-10-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220425122143.56815-1-jefflexu@linux.alibaba.com> References: <20220425122143.56815-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,SPF_HELO_NONE,SPF_PASS, 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 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