Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp54881lfe; Fri, 15 Apr 2022 19:12:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBSARikJWLtQeHxoFIpNqup2F5pJQA2l9ouvSTBNLeG8UuZNF0qILvzl9YtYqhvEIYkpwR X-Received: by 2002:a63:7559:0:b0:39e:44f4:363 with SMTP id f25-20020a637559000000b0039e44f40363mr1342296pgn.267.1650075119962; Fri, 15 Apr 2022 19:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650075119; cv=none; d=google.com; s=arc-20160816; b=QVNNgtf/iGNDhB/LI6PoQ+0BKllOQdlgcKeCdQN/yh/t2sFk7Cul4IuZJmJRQJy/Az WjVG1axQ4BIxry7CdC1RzHwCF8JVdXgGVTfjSie7OEHEb7qXlY8bJ4QAlOzgZzuN9zEi I/BGbxq7Frke4EVJel4UI18eRBZeKm38otAvbSGJ9SYVE2RI7AdqnCGr8w8YmavJZgk9 wVMtnIiyY8XwA+K2EFGWJHg2qRtGuIJtUmwNMneSCAk+SpxpQMwxaLITuRuXC4MVZVqE GK7nLZvZZfLpEbri6TpI5FNH3oRBLHVL28yvi+Utcw8RQUHab3xJb2IB8vr8OTE/YSOX NmTw== 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=ylFtlfYUq70r2+5FuKfq6uZVB4nLxWMopixOIvJnMJgW1fkE1htL6H4YKSwFOmYSas i8fRjzp7sXgCQneaR6tZlB77qA8hikfuKC0noE3Rai8Z4E2WYPMaTrJLMCr56LWLNV2C Vo3R8BBCJ+8mWHNywj6n5Ero5FeN+HMsQ9+b7lBPywnWK2FoGpl/sCZ19YqFifh7oDJi vH+PnzICKEJw3aajMS/8+yq3mjfABSUMXgm8+x5+Z2ut8yjUtkrTdHmwKFyQqRnaWLhs 405pAoklqUDJOxOitjgy6RymRJU81rPNX3HFApXS34wowRsNpjPKgpW3PjLCytS/u29B 2A+A== 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 n61-20020a17090a5ac300b001ca64c6f839si5987386pji.15.2022.04.15.19.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:11:59 -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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0CB81F0C8A; Fri, 15 Apr 2022 18:29:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353684AbiDOMka (ORCPT + 99 others); Fri, 15 Apr 2022 08:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353536AbiDOMjZ (ORCPT ); Fri, 15 Apr 2022 08:39:25 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC0B622B0F; Fri, 15 Apr 2022 05:36:34 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R791e4;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=19;SR=0;TI=SMTPD_---0VA7Cc2H_1650026189; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VA7Cc2H_1650026189) by smtp.aliyun-inc.com(127.0.0.1); Fri, 15 Apr 2022 20:36:30 +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 Subject: [PATCH v9 09/21] erofs: make erofs_map_blocks() generally available Date: Fri, 15 Apr 2022 20:36:02 +0800 Message-Id: <20220415123614.54024-10-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220415123614.54024-1-jefflexu@linux.alibaba.com> References: <20220415123614.54024-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