mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Ironic visualization in menuconfig for NTFS_FS vs NTFS3_FS
@ 2026-06-16  9:24 Xi Ruoyao
  2026-06-16 14:22 ` Julian Braha
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Ruoyao @ 2026-06-16  9:24 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Nathan Chancellor, Nicolas Schier, Hyunchul Lee, Mingcong Bai,
	linux-kernel, linux-fsdevel

Hi,

In the Kconfig for NTFS3 we now have:

config NTFS3_FS
    tristate "NTFS Read-Write file system support"
    depends on !NTFS_FS || m

It basically means some sort of conflict between NTFS_FS and NTFS3_FS. 
But then menuconfig is apparently puzzled to believe NTFS3_FS "depends
on" NTFS_FS, and put NTFS3_FS as a subentry of NTFS_FS:

  │ │    <M> NTFS file system support                                     │ │  
  │ │    [ ]   NTFS debugging support (NEW)                               │ │  
  │ │    [ ]   NTFS POSIX Access Control Lists (NEW)                      │ │  
  │ │    <M>   NTFS Read-Write file system support                        │ │  
  │ │    [ ]     64 bits per NTFS clusters                                │ │  
  │ │    [*]     activate support of external compressions lzx/xpress     │ │  
  │ │    [ ]     NTFS POSIX Access Control Lists                          │  

This is really ironic (some opposite of the intention of the depends on
line) and it can easily puzzle new kernel developers into wrongly
believing "NTFS3_FS is a extension of NTFS_FS providing write support."

I can "work it around" with:

--- a/fs/ntfs3/Kconfig
+++ b/fs/ntfs3/Kconfig
@@ -1,7 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0-only
+config NO_NTFS
+	bool
+	default !NTFS_FS
+
 config NTFS3_FS
 	tristate "NTFS Read-Write file system support"
-	depends on !NTFS_FS || m
+	depends on NO_NTFS || m
 	select BUFFER_HEAD
 	select NLS
 	select LEGACY_DIRECT_IO

but maybe Kconfig should just handle this better.  Thoughts?

-- 
Xi Ruoyao <xry111@xry111.site>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Ironic visualization in menuconfig for NTFS_FS vs NTFS3_FS
  2026-06-16  9:24 Ironic visualization in menuconfig for NTFS_FS vs NTFS3_FS Xi Ruoyao
@ 2026-06-16 14:22 ` Julian Braha
  0 siblings, 0 replies; 2+ messages in thread
From: Julian Braha @ 2026-06-16 14:22 UTC (permalink / raw)
  To: Xi Ruoyao, linux-kbuild
  Cc: Nathan Chancellor, Nicolas Schier, Hyunchul Lee, Mingcong Bai,
	linux-kernel, linux-fsdevel

Hi Xi,

On 6/16/26 10:24, Xi Ruoyao wrote:
> Hi,
> 
> In the Kconfig for NTFS3 we now have:
> 
> config NTFS3_FS
>     tristate "NTFS Read-Write file system support"
>     depends on !NTFS_FS || m
> 
> It basically means some sort of conflict between NTFS_FS and NTFS3_FS. 
> But then menuconfig is apparently puzzled to believe NTFS3_FS "depends
> on" NTFS_FS, and put NTFS3_FS as a subentry of NTFS_FS:
> 
>   │ │    <M> NTFS file system support                                     │ │  
>   │ │    [ ]   NTFS debugging support (NEW)                               │ │  
>   │ │    [ ]   NTFS POSIX Access Control Lists (NEW)                      │ │  
>   │ │    <M>   NTFS Read-Write file system support                        │ │  
>   │ │    [ ]     64 bits per NTFS clusters                                │ │  
>   │ │    [*]     activate support of external compressions lzx/xpress     │ │  
>   │ │    [ ]     NTFS POSIX Access Control Lists                          │  

This looks like a bug in menuconfig's behavior, as from
Documentation/kbuild/kconfig-language.rst:
"If a menu entry somehow depends on the previous entry, it can be made a
submenu of it."

And since Kconfig treats 'source' similarly to C's '#include' (the text
of the file effectively just gets copy-pasted in), it's like the config
options in fs/ntfs3/Kconfig immediately follow the options in
fs/ntfs/Kconfig since the sources are back-to-back.

You can test this by simply adding some other, unrelated config option
between the two 'source' entries that doesn't depend on NTFS_FS or
!NTFS_FS.

So, anyway, it seems to be simply ignoring the '!', and just treating it
as a dependency.
And you can test this by removing that dependency on !NTFS_FS, which
causes menuconfig to stop rendering it as part of the menu.

I think your workaround is okay (there are other similar 'NO_' config
options in the kernel), but it would be better to fix this menuconfig
bug.

- Julian Braha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-16 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-16  9:24 Ironic visualization in menuconfig for NTFS_FS vs NTFS3_FS Xi Ruoyao
2026-06-16 14:22 ` Julian Braha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome