Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp427941lqi; Thu, 7 Mar 2024 01:08:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXMYNJh8MkathosT6ab3Oh+vHrlNDx+K1psFcyCQPr3/UPrP4DUMHvrV8w5CzPL8vxbQSudPPk8p6b1RqVk0xHuPTy3F7Yy+oAn3Fi4yg== X-Google-Smtp-Source: AGHT+IEW7L2NehpCDwY/Yf7ih1ifa0VyfFYokZZ6k1voIrXThbN6cr+iwzpnbQ8NRxTaTwPDUcLt X-Received: by 2002:a50:c90d:0:b0:566:8054:562 with SMTP id o13-20020a50c90d000000b0056680540562mr12765728edh.3.1709802520516; Thu, 07 Mar 2024 01:08:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709802520; cv=pass; d=google.com; s=arc-20160816; b=mI4LV7kCJYZTDJu0ugNFt40qJU2+Hn3TXs/toTxV8LJz/JldvL7aWym9lTe2dInYLe kW3RSN3ob3SA0vZnn5vLjVaZvH1ttjtB/BhSJkPv1uMWd043CmvmC/7JonmscdQOMwik kfputoeXf+WDoMHwxC77bwQZ9LLs4lpQUnDnc74SHC9fA74IdG4fPlu2mmYsi6rY6K0h vQ0muDXz5yiwHJwW5m3gHyetMv9Hb4LV3wkApp39J8HWzuuO+enRxaNYafwXeuH1PwlG Oq3r3db6YiTa+328QjLAJRmeyrI6WIUnH2e+MBeSyj56MVEYJQecglxdDMK7KWRooxyN Mq3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=NzYUxrkDYLYIk+Whz/nhovSA9OS9dsMHAJHShcPyP3Y=; fh=5IVOnG28YEOsk9WiS8YbVdIKKJPOd5eKRm1+INKfiKI=; b=I3jXZiCcT7uiaYjeq+osvE2OUU8PKMatvlr039oom2CaQi7mm9P+DFxMm8u20WH6k/ oJ3iSdPNFf2mR8fjbvOw/za85wV6M2noMew2nRhTXJm/aQjAw6Lat5VbPYGO7ZzXy/2S OcswNjdWJPujwKoW88VrDArvCw0Dt6+rObpO0esFfg/tQOMkoCy8qS/HPZDvH6dLS3dw rkBXn59YYFZoseMU+8e8d7dTBAm/aOYOlT/NhGsxmiGesnH4iUi46ClND5D2WR4NeCc+ A1E9IgERpAbnRjGc4hh/4ALdzblREBji6p7/DJFnxXMgvh/yWhRELG8AKR6lMs8a4Kca GyXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-95185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b17-20020a056402279100b005642ea0a7besi6931310ede.164.2024.03.07.01.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 01:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-95185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 431C21F215F5 for ; Thu, 7 Mar 2024 09:08:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9F4182D8A; Thu, 7 Mar 2024 09:08:35 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 1593D823BF for ; Thu, 7 Mar 2024 09:08:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709802515; cv=none; b=Ct42EYfVKCR+G/oyQ3C9cikjKn0qzr9NKeW1M+IbWCvM0prAOjXTnCH6YMH9Oi4edBqTsShaJbvh/CqHRzz1AgJuAEk+TukwCEe/2VEyNRWp90LAaolI/S0WRGAZeOf5hKiLehuq5MclSWwZjAFAWpUoPnVLWPyh+2DC2VUFaEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709802515; c=relaxed/simple; bh=MhPKVKt5bqVMniQ/NgqFAw+BatWOS+z0ZiSQ9WK6huM=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ntYIhBUnqBkpg0GkJ9fOZd6JnPih/BX2HF55Ttq75YWlO+qVbM+5TN3n/+/fS3Eya/spiJURu0hkQb7SH9aFtBl81W1FgBw4bwPFjPkOsfaSwE9p32HSqq9oxHsjlTBFZZBVJmbttBCfDO6ArpON+tkaatBhwoM4Hcu7ou2dDC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Tr3Ls2yX2zXhsC; Thu, 7 Mar 2024 17:06:13 +0800 (CST) Received: from dggpeml500021.china.huawei.com (unknown [7.185.36.21]) by mail.maildlp.com (Postfix) with ESMTPS id 4F4981400DD; Thu, 7 Mar 2024 17:08:30 +0800 (CST) Received: from [10.174.177.174] (10.174.177.174) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 7 Mar 2024 17:08:29 +0800 Message-ID: <84a79c06-692a-25b8-b95c-21e565eced19@huawei.com> Date: Thu, 7 Mar 2024 17:08:29 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH] erofs: fix lockdep false positives on initializing erofs_pseudo_mnt Content-Language: en-US To: Al Viro CC: , , , , , , , , , , Baokun Li References: <20240307024459.883044-1-libaokun1@huawei.com> <20240307050717.GB538574@ZenIV> <7e9746db-033e-64d0-a3d5-9d341c66cec7@huawei.com> <20240307072112.GC538574@ZenIV> <20240307084608.GD538574@ZenIV> From: Baokun Li In-Reply-To: <20240307084608.GD538574@ZenIV> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500021.china.huawei.com (7.185.36.21) On 2024/3/7 16:46, Al Viro wrote: > On Thu, Mar 07, 2024 at 07:21:12AM +0000, Al Viro wrote: >> On Thu, Mar 07, 2024 at 03:06:49PM +0800, Baokun Li wrote: >>>>> +int erofs_anon_register_fs(void) >>>>> +{ >>>>> + return register_filesystem(&erofs_anon_fs_type); >>>>> +} >>>> What for? The only thing it gives you is an ability to look it up by >>>> name. Which is completely pointless, IMO, >>> The helper function here is to avoid extern erofs_anon_fs_type(), because >>> we define it in fscache.c, but also use it in super.c. Moreover, we don't >>> need >>> to register it when CONFIG_EROFS_FS_ONDEMAND is not enabled, so we >> You don't need to register it at all. >> >> The one and only effect of register_filesystem() is making file_system_type >> instance visible to get_fs_type() (and making it show up in /proc/filesystems). >> >> That's it. If you want to have it looked up by name (e.g. for userland >> mounts), you need to register. If not, you do not need to do that. >> >> Note that kern_mount() take a pointer to struct file_system_type, >> not its (string) name. So all you get from registration is an extra line >> in /proc/filesystems. What's the point? > PS: at one point I considered renaming it to something that would sound > less vague, but the best variant I'd been able to come up with was > "publish_filesystem()", which is not much better and has an extra problem - > how do you describe the reverse of that? "withdraw_filesystem()"? > Decided that it wasn't worth the amount of noise and headache... I feel the emphasis on "fs_name" rather than "filesystem" is less likely to be misunderstood. What do you think about renaming to add_fs_name/remove_fs_name? -- With Best Regards, Baokun Li .