[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKYAXd8RFwBfvWb=mjg+_nq=B1E=g8JURjAiQnjt4jK+rXcXtQ@mail.gmail.com>
Date: Fri, 28 Nov 2025 21:28:24 +0900
From: Namjae Jeon <linkinjeon@...nel.org>
To: Amir Goldstein <amir73il@...il.com>
Cc: viro@...iv.linux.org.uk, brauner@...nel.org, hch@...radead.org, hch@....de,
tytso@....edu, willy@...radead.org, jack@...e.cz, djwong@...nel.org,
josef@...icpanda.com, sandeen@...deen.net, rgoldwyn@...e.com,
xiang@...nel.org, dsterba@...e.com, pali@...nel.org, ebiggers@...nel.org,
neil@...wn.name, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
iamjoonsoo.kim@....com, cheol.lee@....com, jay.sim@....com, gunho.lee@....com
Subject: Re: [PATCH v2 11/11] ntfsplus: add Kconfig and Makefile
> > > I think that the way to implement it is using an auxiliary choice config var
> > > in fs/Kconfig (i.e. CONFIG_DEFAULT_NTFS) and select/depends statements
> > > to only allow the default ntfs driver to be configured as 'y',
> > > but couldn't find a good example to point you at.
> > Okay. Could you please check whether the attached patch matches what
> > you described ?
>
> It's what I meant, but now I think it could be simpler...
>
> >
> > Thanks!
> > >
> > > Thanks,
> > > Amir.
>
> > From 11154917ff53d6cf218ac58e6776e603246587b6 Mon Sep 17 00:00:00 2001
> > From: Namjae Jeon <linkinjeon@...nel.org>
> > Date: Fri, 28 Nov 2025 11:44:45 +0900
> > Subject: [PATCH] ntfs: restrict built-in NTFS seclection to one driver, allow
> > both as modules
> >
> > Signed-off-by: Namjae Jeon <linkinjeon@...nel.org>
> > ---
> > fs/Kconfig | 11 +++++++++++
> > fs/ntfs3/Kconfig | 2 ++
> > fs/ntfsplus/Kconfig | 1 +
> > 3 files changed, 14 insertions(+)
> >
> > diff --git a/fs/Kconfig b/fs/Kconfig
> > index 70d596b99c8b..c379383cb4ff 100644
> > --- a/fs/Kconfig
> > +++ b/fs/Kconfig
> > @@ -155,6 +155,17 @@ source "fs/exfat/Kconfig"
> > source "fs/ntfs3/Kconfig"
> > source "fs/ntfsplus/Kconfig"
> >
> > +choice
> > + prompt "Select built-in NTFS filesystem (only one can be built-in)"
> Usually for choice vars there should be a default and usually
> there should be a DEFAULT_NTFS_NONE
Okay.
>
> > + help
> > + Only one NTFS can be built into the kernel(y).
> > + Both can still be built as modules(m).
> > +
> > + config DEFAULT_NTFSPLUS
> > + bool "NTFS+"
> Usually, this would also 'select NTFS_FS'
Okay.
>
> > + config DEFAULT_NTFS3
> > + bool "NTFS3"
> > +endchoice
> > endmenu
> > endif # BLOCK
> >
> > diff --git a/fs/ntfs3/Kconfig b/fs/ntfs3/Kconfig
> > index 7bc31d69f680..18bd6c98c6eb 100644
> > --- a/fs/ntfs3/Kconfig
> > +++ b/fs/ntfs3/Kconfig
> > @@ -1,6 +1,7 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > config NTFS3_FS
> > tristate "NTFS Read-Write file system support"
> > + depends on !DEFAULT_NTFSPLUS || m
>
> So seeing how this condition looks, instead of aux var,
> it could be directly
>
> depends on NTFS_FS != y || m
Okay.
>
> > select BUFFER_HEAD
> > select NLS
> > select LEGACY_DIRECT_IO
> > @@ -49,6 +50,7 @@ config NTFS3_FS_POSIX_ACL
> >
> > config NTFS_FS
>
> This alias should definitely go a way when you add back
> the original NTFS_FS.
>
> Preferably revert the commit that added the alias at the
> start of your series.
Okay.
>
> > tristate "NTFS file system support"
> > + depends on !DEFAULT_NTFSPLUS || m
> > select NTFS3_FS
> > select BUFFER_HEAD
> > select NLS
> > diff --git a/fs/ntfsplus/Kconfig b/fs/ntfsplus/Kconfig
> > index 78bc34840463..c8d1ab99113c 100644
> > --- a/fs/ntfsplus/Kconfig
> > +++ b/fs/ntfsplus/Kconfig
> > @@ -1,6 +1,7 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > config NTFSPLUS_FS
> > tristate "NTFS+ file system support (EXPERIMENTAL)"
> > + depends on !DEFAULT_NTFS3 || m
>
> Likewise:
> depends on NTFS3_FS != y || m
>
> Obviously, not tested.
>
> If this works, I don't think there is a need for the choice variable
>
> As long as you keep the order in fs/Kconfig correct (ntfs before ntfs3)
> I assume that an oldconfig with both set to y NTFS_FS will win?
> Please verify that.
Okay, I will check it.
Thanks for your review!
>
> Thanks,
> Amir.
Powered by blists - more mailing lists