Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2196577pxb; Fri, 25 Mar 2022 12:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCJRDsUn8fNV1V6sdMHZtX8/vz/jGpmq5w0QB3F8WvgQXjagbcYDoHKa0WIf9HN3k+EOsJ X-Received: by 2002:a65:6942:0:b0:378:9365:5963 with SMTP id w2-20020a656942000000b0037893655963mr919906pgq.142.1648237843876; Fri, 25 Mar 2022 12:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237843; cv=none; d=google.com; s=arc-20160816; b=EEmT34xhSiccdyFBtNkwPeC5wdC55rkO1MCwBzsu3E8ILpsQSBX8fgvlzGihSYgDhw PD0GnuEVougZB7ylydvZ2P0x0SwDk+fPJ8N7dKaA534uy/ak6l3jHxtTgWPsngyXjgW4 lXrQU0nJH7ECbzXtEKZZbis3hGWZ4EukDxNE5wFAi+g9DmkYkYTv24ztG8sLqQtdLIXj +SFZMWDhjwtDimnb1R903bRdvxD6W9Blvi9W9bIhY8ur8NTRbPBhnDggQn6D8deukw0J Uv2E1Z9fFtrqU0MLKtftZtut2ysR1/JcDvdnK0s1roo0dh5n0Buk3AkSYKJ2Uv9a3ZO3 sDWQ== 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=OqjP5Y2Wx1YMYlt8xE2v976F/erwCQ4o6pEnExPpEHQ=; b=GJrjMNgvegxZvXTR6AYjBEltpXRxdflaVMhAonbnN2w0/eiZiB84bg1pB1lR3bcJys Z6UGmTp1FOk68y3OU6zlBUZNjF+/htIHCkiDXjrSPJEGQaZTj6miCYkSDLz7okL556VE Z8Q490+1XoPsWBRq++54tVZD6RhaVdL83JokIeCoobPUDIvd84b/x50VHiyclcoazMg8 dJKLEFUtLpi9wxm7YEI25zeoUBv0YXHwzPZ73LeIjgDA8a9fi21BksbD3jFfLrEdd8db 9zNV19fNWu9SBYCeO2MECfAfPOIyDfiFnxA72aCCtGzJiMkk3dMyKglXmUI23A5ciqru vsvg== 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 f128-20020a62db86000000b004fac74c8c8asi3338854pfg.329.2022.03.25.12.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:50:43 -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 3FD902CD815; Fri, 25 Mar 2022 11:40:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357470AbiCYMZy (ORCPT + 99 others); Fri, 25 Mar 2022 08:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358997AbiCYMYm (ORCPT ); Fri, 25 Mar 2022 08:24:42 -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 C3E72D4CB5; Fri, 25 Mar 2022 05:22:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;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=18;SR=0;TI=SMTPD_---0V89zY2J_1648210957; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V89zY2J_1648210957) by smtp.aliyun-inc.com(127.0.0.1); Fri, 25 Mar 2022 20:22:38 +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 v6 09/22] erofs: make erofs_map_blocks() generally available Date: Fri, 25 Mar 2022 20:22:10 +0800 Message-Id: <20220325122223.102958-10-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220325122223.102958-1-jefflexu@linux.alibaba.com> References: <20220325122223.102958-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 fs/erofs/fscache.c. 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 226a57c57ee6..6e2a28242453 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -104,8 +104,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 5aa2cf2c2f80..e424293f47a2 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -484,6 +484,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