Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2288892pxp; Fri, 18 Mar 2022 07:29:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL7Tcfq4XV6bS2YtydrAamaiFfvYSFK4bZAcWsW3zULkzL0A4l4hEK0LvFhBKfwQ6mg/sk X-Received: by 2002:a65:6bd4:0:b0:374:1fe3:e18a with SMTP id e20-20020a656bd4000000b003741fe3e18amr7968120pgw.621.1647613757933; Fri, 18 Mar 2022 07:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647613757; cv=none; d=google.com; s=arc-20160816; b=jObXUGl3eFygHIhMSpgryxqVdjEhyGlDXKMdWqT+Q5fF7FWzjSstKqcYlaXQ1K3Ri5 J1pR6IhmoyU+hRoFRZyL6fbJFxAua2s4mb1Qyi/n90KGgEAYTuZllpQPbMbn6YlTOtD/ RlccbUVSdzKairm5RlR8vVnXqI6SJSaSJygPKZV1tudpNHAo/4CtA/1ktlOYZ/u45qx0 SBhME9Lf0misSoyStE9Sxn3qVkmP+J2Ts7/A3GcSNWZHE9xqb8XNvPZMpu280XsxkYvE lSEXPJiaVvqDFsV2RLcT2DRaVTrfbzj8kA2nR95/CP6skFcR6zZafnnVIIYTmph+WZ7u Tc4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=rVoBjLH/87+59UIgzMTr0F1/3o6PpCHelFhSxz/AF5A=; b=gBlxCFFljSWuBR0f4t+J8bVpH9+HlJggLulLcAn6fTAboj1h14/KbpU5TO/bwi0rcz NA6rtZzEUCtwfQggB6lH0CfW6DyrUJLtAy3QCJrwGZ9j1eRuCGygK0eDQLyBROKq36SS PAIrVhtaHsUhSCMU59wnvFr4J0hqlm0u69/w2YOvREtElK95WbN11R8h6IfQB16romBO T3jCqyr3k8yOc8Ni4WyYbP2C7PaaG/cMNVXXA6vW82qkoR1mtQNcoe9rWJiJGiXAudCS vr8IDU3+ney0beRCkAZP4jAyDPA+QDGBZetyoG8uANwyAu2rIsA22mnjo3U855JQA66k /5Mw== 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 h2-20020a17090aa88200b001c680dc9e6asi4617042pjq.61.2022.03.18.07.29.04; Fri, 18 Mar 2022 07:29:17 -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 S232504AbiCRF2X (ORCPT + 99 others); Fri, 18 Mar 2022 01:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230100AbiCRF2W (ORCPT ); Fri, 18 Mar 2022 01:28:22 -0400 Received: from out199-12.us.a.mail.aliyun.com (out199-12.us.a.mail.aliyun.com [47.90.199.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D3A2BFAEE; Thu, 17 Mar 2022 22:26:56 -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=e01e04426;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0V7UqACk_1647581210; Received: from 30.225.24.52(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V7UqACk_1647581210) by smtp.aliyun-inc.com(127.0.0.1); Fri, 18 Mar 2022 13:26:51 +0800 Message-ID: Date: Fri, 18 Mar 2022 13:26:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [Linux-cachefs] [PATCH v5 10/22] erofs: add mode checking helper Content-Language: en-US To: dhowells@redhat.com, linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, gregkh@linuxfoundation.org, tao.peng@linux.alibaba.com, willy@infradead.org, linux-kernel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, linux-fsdevel@vger.kernel.org, luodaowen.backend@bytedance.com, eguan@linux.alibaba.com, gerry@linux.alibaba.com, torvalds@linux-foundation.org References: <20220316131723.111553-1-jefflexu@linux.alibaba.com> <20220316131723.111553-11-jefflexu@linux.alibaba.com> From: JeffleXu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,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 On 3/17/22 1:36 PM, Gao Xiang wrote: > On Wed, Mar 16, 2022 at 09:17:11PM +0800, Jeffle Xu wrote: >> Until then erofs is exactly blockdev based filesystem. In other using >> scenarios (e.g. container image), erofs needs to run upon files. >> >> This patch set is going to introduces a new nodev mode, in which erofs >> could be mounted from a bootstrap blob file containing complete erofs >> image. >> >> Add a helper checking which mode erofs works in. >> >> Signed-off-by: Jeffle Xu >> --- >> fs/erofs/internal.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h >> index e424293f47a2..f66af9ebda43 100644 >> --- a/fs/erofs/internal.h >> +++ b/fs/erofs/internal.h >> @@ -161,6 +161,11 @@ struct erofs_sb_info { >> #define set_opt(opt, option) ((opt)->mount_opt |= EROFS_MOUNT_##option) >> #define test_opt(opt, option) ((opt)->mount_opt & EROFS_MOUNT_##option) >> >> +static inline bool erofs_bdev_mode(struct super_block *sb) > > How about renaming it as erofs_is_nodev_mode()? Sure, will be renamed in the next version. -- Thanks, Jeffle