linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, hch@infradead.org,
	hch@lst.de, tytso@mit.edu, willy@infradead.org, jack@suse.cz,
	djwong@kernel.org, josef@toxicpanda.com, sandeen@sandeen.net,
	rgoldwyn@suse.com, xiang@kernel.org, dsterba@suse.com,
	pali@kernel.org, ebiggers@kernel.org, neil@brown.name,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	iamjoonsoo.kim@lge.com, cheol.lee@lge.com, jay.sim@lge.com,
	gunho.lee@lge.com
Subject: Re: [PATCH v2 11/11] ntfsplus: add Kconfig and Makefile
Date: Fri, 28 Nov 2025 11:18:17 +0100	[thread overview]
Message-ID: <aSl26bbeD4-Ev1ky@amir-ThinkPad-T480> (raw)
In-Reply-To: <CAKYAXd8K76CeQNtR-QOMSJ_JjuoiibuQkd4NhkPPM_CQNdNajw@mail.gmail.com>

On Fri, Nov 28, 2025 at 12:02:25PM +0900, Namjae Jeon wrote:
> On Thu, Nov 27, 2025 at 10:12 PM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Thu, Nov 27, 2025 at 1:40 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
> > >
> > > On Thu, Nov 27, 2025 at 8:22 PM Amir Goldstein <amir73il@gmail.com> wrote:
> > > >
> > > > On Thu, Nov 27, 2025 at 6:01 AM Namjae Jeon <linkinjeon@kernel.org> wrote:
> > > > >
> > > > > This adds the Kconfig and Makefile for ntfsplus.
> > > > >
> > > > > Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
> > > > > ---
> > > > >  fs/Kconfig           |  1 +
> > > > >  fs/Makefile          |  1 +
> > > > >  fs/ntfsplus/Kconfig  | 45 ++++++++++++++++++++++++++++++++++++++++++++
> > > > >  fs/ntfsplus/Makefile | 18 ++++++++++++++++++
> > > > >  4 files changed, 65 insertions(+)
> > > > >  create mode 100644 fs/ntfsplus/Kconfig
> > > > >  create mode 100644 fs/ntfsplus/Makefile
> > > > >
> > > > > diff --git a/fs/Kconfig b/fs/Kconfig
> > > > > index 0bfdaecaa877..70d596b99c8b 100644
> > > > > --- a/fs/Kconfig
> > > > > +++ b/fs/Kconfig
> > > > > @@ -153,6 +153,7 @@ menu "DOS/FAT/EXFAT/NT Filesystems"
> > > > >  source "fs/fat/Kconfig"
> > > > >  source "fs/exfat/Kconfig"
> > > > >  source "fs/ntfs3/Kconfig"
> > > > > +source "fs/ntfsplus/Kconfig"
> > > > >
> > > > >  endmenu
> > > > >  endif # BLOCK
> > > > > diff --git a/fs/Makefile b/fs/Makefile
> > > > > index e3523ab2e587..2e2473451508 100644
> > > > > --- a/fs/Makefile
> > > > > +++ b/fs/Makefile
> > > > > @@ -91,6 +91,7 @@ obj-y                         += unicode/
> > > > >  obj-$(CONFIG_SMBFS)            += smb/
> > > > >  obj-$(CONFIG_HPFS_FS)          += hpfs/
> > > > >  obj-$(CONFIG_NTFS3_FS)         += ntfs3/
> > > > > +obj-$(CONFIG_NTFSPLUS_FS)      += ntfsplus/
> > > >
> > > > I suggested in another reply to keep the original ntfs name
> > > >
> > > > More important is to keep your driver linked before the unmaintained
> > > > ntfs3, so that it hopefully gets picked up before ntfs3 for auto mount type
> > > > if both drivers are built-in.
> > > Okay, I will check it:)
> > > >
> > > > I am not sure if keeping the order here would guarantee the link/registration
> > > > order. If not, it may make sense to mutually exclude them as built-in drivers.
> > > Okay, I am leaning towards the latter.
> >
> > Well it's not this OR that.
> > please add you driver as the original was before ntfs3
> >
> > obj-$(CONFIG_NTFS_FS)      += ntfs/
> > obj-$(CONFIG_NTFS3_FS)         += ntfs3/
> Okay.
> >
> > > If you have no objection, I will add the patch to mutually exclude the two ntfs implementation.
> >
> > You should definitely allow them both if at least one is built as a module
> > I think it would be valuable for testing.
> >
> > Just that
> > CONFIG_NTFS_FS=y
> > CONFIG_NTFS3_FS=y
> >
> > I don't see the usefulness in allowing that.
> > (other people may disagree)
> >
> > 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@kernel.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@kernel.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

> +   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'

> +   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

>  	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.

>  	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.

Thanks,
Amir.

  reply	other threads:[~2025-11-28 10:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  4:59 [PATCH v2 00/11] ntfsplus: ntfs filesystem remake Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 01/11] ntfsplus: in-memory, on-disk structures and headers Namjae Jeon
2025-12-01  7:14   ` Christoph Hellwig
2025-12-01  8:19     ` Pali Rohár
2025-12-01 10:14       ` Namjae Jeon
2025-12-01  8:47     ` Matthew Wilcox
2025-12-01 10:13       ` Namjae Jeon
2025-12-01 11:22         ` Christoph Hellwig
2025-12-01 11:46           ` Matthew Wilcox
2025-12-01 21:54             ` Namjae Jeon
2025-12-02  5:41             ` Christoph Hellwig
2025-12-01 10:36     ` Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 02/11] ntfsplus: add super block operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 03/11] ntfsplus: add inode operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 04/11] ntfsplus: add directory operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 05/11] ntfsplus: add file operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 06/11] ntfsplus: add iomap and address space operations Namjae Jeon
2025-12-01  7:35   ` Christoph Hellwig
2025-12-02  0:47     ` Namjae Jeon
2025-12-02  5:45       ` Christoph Hellwig
2025-12-02  7:52         ` Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 07/11] ntfsplus: add attrib operatrions Namjae Jeon
2025-12-01  7:36   ` Christoph Hellwig
2025-12-01 11:38     ` Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 08/11] ntfsplus: add runlist handling and cluster allocator Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 09/11] ntfsplus: add reparse and ea operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 10/11] ntfsplus: add misc operations Namjae Jeon
2025-11-27  4:59 ` [PATCH v2 11/11] ntfsplus: add Kconfig and Makefile Namjae Jeon
2025-11-27  9:30   ` Amir Goldstein
2025-11-27 12:18     ` Namjae Jeon
2025-11-27 11:21   ` Amir Goldstein
2025-11-27 12:40     ` Namjae Jeon
2025-11-27 13:11       ` Amir Goldstein
2025-11-28  3:02         ` Namjae Jeon
2025-11-28 10:18           ` Amir Goldstein [this message]
2025-11-28 12:28             ` Namjae Jeon
2025-11-27 11:10 ` [PATCH v2 00/11] ntfsplus: ntfs filesystem remake Amir Goldstein
2025-11-27 12:17   ` Namjae Jeon
2025-11-27 13:16     ` Amir Goldstein
2025-11-27 23:14       ` Namjae Jeon
2025-11-27 14:58     ` Matthew Wilcox
2025-11-27 23:19       ` Namjae Jeon
2025-11-28  1:46 ` Winston Wen
2025-11-28  4:26   ` Gao Xiang
2025-11-28  7:02   ` Namjae Jeon
2025-12-03  0:49     ` Winston Wen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aSl26bbeD4-Ev1ky@amir-ThinkPad-T480 \
    --to=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cheol.lee@lge.com \
    --cc=djwong@kernel.org \
    --cc=dsterba@suse.com \
    --cc=ebiggers@kernel.org \
    --cc=gunho.lee@lge.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jack@suse.cz \
    --cc=jay.sim@lge.com \
    --cc=josef@toxicpanda.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=pali@kernel.org \
    --cc=rgoldwyn@suse.com \
    --cc=sandeen@sandeen.net \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).