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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A8ABC63697 for ; Fri, 13 Nov 2020 21:36:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA2C32222F for ; Fri, 13 Nov 2020 21:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbgKMVgg (ORCPT ); Fri, 13 Nov 2020 16:36:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:36586 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726268AbgKMVgf (ORCPT ); Fri, 13 Nov 2020 16:36:35 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4F01BABD9; Fri, 13 Nov 2020 21:36:33 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 0344ADA87A; Fri, 13 Nov 2020 22:34:49 +0100 (CET) Date: Fri, 13 Nov 2020 22:34:49 +0100 From: David Sterba To: Anand Jain Cc: Damien Le Moal , Johannes Thumshirn , Naohiro Aota , "linux-btrfs@vger.kernel.org" , "dsterba@suse.com" , "hare@suse.com" , "linux-fsdevel@vger.kernel.org" , Jens Axboe , "hch@infradead.org" , "Darrick J. Wong" , Josef Bacik Subject: Re: [PATCH v10 04/41] btrfs: get zone information of zoned block devices Message-ID: <20201113213449.GH6756@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Anand Jain , Damien Le Moal , Johannes Thumshirn , Naohiro Aota , "linux-btrfs@vger.kernel.org" , "dsterba@suse.com" , "hare@suse.com" , "linux-fsdevel@vger.kernel.org" , Jens Axboe , "hch@infradead.org" , "Darrick J. Wong" , Josef Bacik References: <6df7390f-6656-4795-ac54-a99fdaf67ac6@oracle.com> <4a796bcd-ebac-eff2-6085-346a102b5952@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a796bcd-ebac-eff2-6085-346a102b5952@oracle.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Nov 12, 2020 at 05:44:11PM +0800, Anand Jain wrote: > On 12/11/20 3:44 pm, Damien Le Moal wrote: > > On 2020/11/12 16:35, Johannes Thumshirn wrote: > >> On 12/11/2020 08:00, Anand Jain wrote: > >>>> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > >>>> index 8840a4fa81eb..ed55014fd1bd 100644 > >>>> --- a/fs/btrfs/super.c > >>>> +++ b/fs/btrfs/super.c > >>>> @@ -2462,6 +2462,11 @@ static void __init btrfs_print_mod_info(void) > >>>> #endif > >>>> #ifdef CONFIG_BTRFS_FS_REF_VERIFY > >>>> ", ref-verify=on" > >>>> +#endif > >>>> +#ifdef CONFIG_BLK_DEV_ZONED > >>>> + ", zoned=yes" > >>>> +#else > >>>> + ", zoned=no" > >>>> #endif > >>> IMO, we don't need this, as most of the generic kernel will be compiled > >>> with the CONFIG_BLK_DEV_ZONED defined. > >>> For review purpose we may want to know if the mounted device > >>> is a zoned device. So log of zone device and its type may be useful > >>> when we have verified the zoned devices in the open_ctree(). > >>> > >> > >> David explicitly asked for this in [1] so we included it. > >> > >> [1] https://lore.kernel.org/linux-btrfs/20201013155301.GE6756@twin.jikos.cz > >> > > > > And as of now, not all generic kernels are compiled with CONFIG_BLK_DEV_ZONED. > > E.g. RHEL and CentOS. That may change in the future, but it should not be > > assumed that CONFIG_BLK_DEV_ZONED is always enabled. > > Ok. My comment was from the long term perspective. I am fine if you want > to keep it. The idea is to let the module announce which conditionally built features are there according to fs/btrfs/Makefile and Kconfig. Besides ACLs that should be always on and self-tests that run right after module load, all other are there and we should keep the list up to date.