From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BFDCCEE32D for ; Wed, 9 Oct 2024 16:57:46 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XNzbD20bzz3bh2 for ; Thu, 10 Oct 2024 03:57:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=115.124.30.111 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728493063; cv=none; b=Yq78tT/huAEvbJqUD+/G5h6yjex3SPEV/o2cMVE2cYNc3TZOLjb6xlKrZCZ5NHVi35bLC2oirRMIIGKLQq9ZPY+tP26Ov05E/Np/D0F9Ft/1LHc7RvQ+WQT/P9qZm9/ifJ5JtlSUl7VxcQuOxTCwQPeA6jBmpJpzhoMxFimkLvH8x9I64g+JltwSnOpBEIZjnRLkoDCURL6/8iJEHLOk/PNPSX9goD0i/NFQ22Fvrnn6tMtSmZKh9T1vsNTjvoMUBIf2y2mlSAi9x221J5OQn2NbGmpiY8O3vSa4fAq6jsxf18D3Eal14ecOBOYnwdz6NDyoIcU4PTBf7eiMMO+i2A== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1728493063; c=relaxed/relaxed; bh=ORzfNt9VkzdEGnE1FeMIA05Qm7yBuvqlTlcI1zkx72I=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=lgG4vwqhCWoXXJVwTs2x2oaQrXCj4WREd7BBUq/rPB9I/MI3WpwCPFvJ49h1cy+U9AfOAnA5xx6e0cv7WDSoX2H/TkUUGNNPQuvvHvFFj/GdmG+lXvAYQc4wa3E+zNozIEO1dCw4kgaqnE06fGS+q7j1lmVBcx26Ze8AVm7NCOIVVtCCC97ega+5o5zCo7ijGlNC+v6Jrly6Xn9fhV99JwdDG/rjNXE1FNdMpmJ/zggJ9lK4yBSvlIpvB/4dxlBe2ouQ7MKYeE8rDcbqwYa8mXIyrENImritIrAtQ7y8WuUriYpVW1R0XUMU5dOI1WfVITFe/KpuJFniw5zS9FrZyA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=HpPCD8/B; dkim-atps=neutral; spf=pass (client-ip=115.124.30.111; helo=out30-111.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.alibaba.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=HpPCD8/B; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.111; helo=out30-111.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=lists.ozlabs.org) Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XNzb332FHz2yQL for ; Thu, 10 Oct 2024 03:57:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1728493049; h=Message-ID:Date:MIME-Version:Subject:From:To:Content-Type; bh=ORzfNt9VkzdEGnE1FeMIA05Qm7yBuvqlTlcI1zkx72I=; b=HpPCD8/BTgLvU8aFW9OgLWsuqrZmLjKeJMPGQNWSRQfYIO8lvFp9qA6rr5mnw5V7pkoDUxPMmxVNDUSr3KGHOSdFNrsXJ3n8G7Vfn5ry3tQunOh1Dt4fxzLND/uhgVHepNM0jtbV8bAYLslO2fDJxnxKtg/9eqkg6TxCiUDmnV0= Received: from 192.168.2.29(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WGjbNX._1728493046) by smtp.aliyun-inc.com; Thu, 10 Oct 2024 00:57:27 +0800 Message-ID: <8ec1896f-93da-4eca-ab69-8ae9d1645181@linux.alibaba.com> Date: Thu, 10 Oct 2024 00:57:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] erofs: use get_tree_bdev_flags() to avoid misleading messages From: Gao Xiang To: Christian Brauner , Christoph Hellwig , Jan Kara References: <20241009033151.2334888-1-hsiangkao@linux.alibaba.com> <20241009033151.2334888-2-hsiangkao@linux.alibaba.com> <8a40d27c-28f1-467b-9a9e-359b36ee5e33@linux.alibaba.com> In-Reply-To: <8a40d27c-28f1-467b-9a9e-359b36ee5e33@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LKML , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, Allison Karlitskaya Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2024/10/9 15:37, Gao Xiang wrote: > Hi Christoph, > ... >>> >>> diff --git a/fs/erofs/super.c b/fs/erofs/super.c >>> index 666873f745da..b89836a8760d 100644 >>> --- a/fs/erofs/super.c >>> +++ b/fs/erofs/super.c >>> @@ -705,7 +705,9 @@ static int erofs_fc_get_tree(struct fs_context *fc) >>>       if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && sbi->fsid) >>>           return get_tree_nodev(fc, erofs_fc_fill_super); >>> -    ret = get_tree_bdev(fc, erofs_fc_fill_super); >>> +    ret = get_tree_bdev_flags(fc, erofs_fc_fill_super, >>> +        IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE) ? >>> +            GET_TREE_BDEV_QUIET_LOOKUP : 0); >> >> Why not pass it unconditionally and provide your own more useful >> error message at the end of the function if you could not find any >> source? > > My own (potential) concern is that if CONFIG_EROFS_FS_BACKED_BY_FILE > is off, EROFS should just behave as other pure bdev fses since I'm > not sure if some userspace program really relies on > "Can't lookup blockdev" behavior. > > .. Yet that is just my own potential worry anyway. Many thanks all for the review... So I guess it sounds fine? Hi Christian, If they also look good to you, since it's a VFS change, if possible, could you apply these two patches through the VFS tree for this cycle? There is a redundant blank line removal in the first patch, I guess you could help adjust or I need to submit another version? I also have another related fix in erofs tree to address a syzbot issue https://lore.kernel.org/r/20240917130803.32418-1-hsiangkao@linux.alibaba.com but it shouldn't cause any conflict with the second patch though.. Thanks, Gao Xiang > > Thanks, > Gao Xiang > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B579D8489; Wed, 9 Oct 2024 16:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728493054; cv=none; b=Rc2ZXWxJSWF38d7HN1QW2rOX1tB/OakE+iWxeWXhTDws7YAYGalf8gCPKhDvojnE1vpAfNbRiUDvYKpzo9mdBEmXkbBycPc2NvZcGhX3o5dx4ZNpxKqEuZbxOiOh/1CLjGmmJnufcUDohUvh5auckpcCHdKP8DONQwUK/zZjzBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728493054; c=relaxed/simple; bh=CI+DTnbZnnoVcpY8hInQcd9sONOPmjh87G32XJSeZMc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=QgXzd4iIXOUjLMbymMgpy4fKsx7Uxpy22JMC+JXPqf9j+RFiDBy/5gsYz9gwqWvy/7BBk1YxqrQJ1NqRmadrC0/Pz9m0zFHpbCfoveAhkwbXQxCNMZY5BbkDyiTLLlVdFe2wl0S9gZKIKAzKJ7Bs1SaYqG810w3pyGWBkA/XicI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=fdvWnX5V; arc=none smtp.client-ip=115.124.30.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="fdvWnX5V" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1728493048; h=Message-ID:Date:MIME-Version:Subject:From:To:Content-Type; bh=ORzfNt9VkzdEGnE1FeMIA05Qm7yBuvqlTlcI1zkx72I=; b=fdvWnX5Vagobbu3rfComX6bHFwRus2IPeJzcivdhO40OM1tohes33Iw8ZPwwi2jO8eXWQp8YHmYxr8j/ZFnkZGpU3beGlrubik2wKR/VKvVbFQZ2OfCHb0mViFhG4OEs18tZwcVoxYyb8Av+DQ6jPzHauwSNiGeDDlsdw6OH7aM= Received: from 192.168.2.29(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WGjbNX._1728493046) by smtp.aliyun-inc.com; Thu, 10 Oct 2024 00:57:27 +0800 Message-ID: <8ec1896f-93da-4eca-ab69-8ae9d1645181@linux.alibaba.com> Date: Thu, 10 Oct 2024 00:57:26 +0800 Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] erofs: use get_tree_bdev_flags() to avoid misleading messages From: Gao Xiang To: Christian Brauner , Christoph Hellwig , Jan Kara Cc: Alexander Viro , Allison Karlitskaya , Chao Yu , LKML , linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org References: <20241009033151.2334888-1-hsiangkao@linux.alibaba.com> <20241009033151.2334888-2-hsiangkao@linux.alibaba.com> <8a40d27c-28f1-467b-9a9e-359b36ee5e33@linux.alibaba.com> In-Reply-To: <8a40d27c-28f1-467b-9a9e-359b36ee5e33@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/10/9 15:37, Gao Xiang wrote: > Hi Christoph, > ... >>> >>> diff --git a/fs/erofs/super.c b/fs/erofs/super.c >>> index 666873f745da..b89836a8760d 100644 >>> --- a/fs/erofs/super.c >>> +++ b/fs/erofs/super.c >>> @@ -705,7 +705,9 @@ static int erofs_fc_get_tree(struct fs_context *fc) >>>       if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && sbi->fsid) >>>           return get_tree_nodev(fc, erofs_fc_fill_super); >>> -    ret = get_tree_bdev(fc, erofs_fc_fill_super); >>> +    ret = get_tree_bdev_flags(fc, erofs_fc_fill_super, >>> +        IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE) ? >>> +            GET_TREE_BDEV_QUIET_LOOKUP : 0); >> >> Why not pass it unconditionally and provide your own more useful >> error message at the end of the function if you could not find any >> source? > > My own (potential) concern is that if CONFIG_EROFS_FS_BACKED_BY_FILE > is off, EROFS should just behave as other pure bdev fses since I'm > not sure if some userspace program really relies on > "Can't lookup blockdev" behavior. > > .. Yet that is just my own potential worry anyway. Many thanks all for the review... So I guess it sounds fine? Hi Christian, If they also look good to you, since it's a VFS change, if possible, could you apply these two patches through the VFS tree for this cycle? There is a redundant blank line removal in the first patch, I guess you could help adjust or I need to submit another version? I also have another related fix in erofs tree to address a syzbot issue https://lore.kernel.org/r/20240917130803.32418-1-hsiangkao@linux.alibaba.com but it shouldn't cause any conflict with the second patch though.. Thanks, Gao Xiang > > Thanks, > Gao Xiang >