This adds the Kconfig and Makefile
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
---
fs/Kconfig | 18 ++++++++++++++++++
fs/Makefile | 1 +
fs/ntfs/Kconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++++
fs/ntfs/Makefile | 18 ++++++++++++++++++
4 files changed, 83 insertions(+)
create mode 100644 fs/ntfs/Kconfig
create mode 100644 fs/ntfs/Makefile
diff --git a/fs/Kconfig b/fs/Kconfig
index 0bfdaecaa877..c57cb6a53baf 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -152,8 +152,26 @@ menu "DOS/FAT/EXFAT/NT Filesystems"
source "fs/fat/Kconfig"
source "fs/exfat/Kconfig"
+source "fs/ntfs/Kconfig"
source "fs/ntfs3/Kconfig"
+choice
+ prompt "Select built-in NTFS filesystem (only one can be built-in)"
+ default DEFAULT_NTFS
+ help
+ Only one NTFS can be built into the kernel(y) when selecting a
+ specific default. Both can still be built as modules(m).
+
+ config DEFAULT_NTFS_NONE
+ bool "No built-in restriction (allows both drivers as 'y')"
+
+ config DEFAULT_NTFS
+ bool "NTFS"
+
+ config DEFAULT_NTFS3
+ bool "NTFS3"
+endchoice
+
endmenu
endif # BLOCK
diff --git a/fs/Makefile b/fs/Makefile
index a04274a3c854..6893496697c4 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -90,6 +90,7 @@ obj-$(CONFIG_NLS) += nls/
obj-y += unicode/
obj-$(CONFIG_SMBFS) += smb/
obj-$(CONFIG_HPFS_FS) += hpfs/
+obj-$(CONFIG_NTFS_FS) += ntfs/
obj-$(CONFIG_NTFS3_FS) += ntfs3/
obj-$(CONFIG_UFS_FS) += ufs/
obj-$(CONFIG_EFS_FS) += efs/
diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
new file mode 100644
index 000000000000..ef14c68ed36c
--- /dev/null
+++ b/fs/ntfs/Kconfig
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config NTFS_FS
+ tristate "NTFS file system support"
+ depends on !DEFAULT_NTFS3 || m
+ select NLS
+ help
+ NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003.
+ This allows you to mount devices formatted with the ntfs file system.
+
+ To compile this as a module, choose M here: the module will be called
+ ntfs.
+
+config NTFS_DEBUG
+ bool "NTFS debugging support"
+ depends on NTFS_FS
+ help
+ If you are experiencing any problems with the NTFS file system, say
+ Y here. This will result in additional consistency checks to be
+ performed by the driver as well as additional debugging messages to
+ be written to the system log. Note that debugging messages are
+ disabled by default. To enable them, supply the option debug_msgs=1
+ at the kernel command line when booting the kernel or as an option
+ to insmod when loading the ntfs module. Once the driver is active,
+ you can enable debugging messages by doing (as root):
+ echo 1 > /proc/sys/fs/ntfs-debug
+ Replacing the "1" with "0" would disable debug messages.
+
+ If you leave debugging messages disabled, this results in little
+ overhead, but enabling debug messages results in very significant
+ slowdown of the system.
+
+ When reporting bugs, please try to have available a full dump of
+ debugging messages while the misbehaviour was occurring.
+
+config NTFS_FS_POSIX_ACL
+ bool "NTFS POSIX Access Control Lists"
+ depends on NTFS_FS
+ select FS_POSIX_ACL
+ help
+ POSIX Access Control Lists (ACLs) support additional access rights
+ for users and groups beyond the standard owner/group/world scheme,
+ and this option selects support for ACLs specifically for ntfs
+ filesystems.
+ NOTE: this is linux only feature. Windows will ignore these ACLs.
+
+ If you don't know what Access Control Lists are, say N.
diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile
new file mode 100644
index 000000000000..01faad8cbbc9
--- /dev/null
+++ b/fs/ntfs/Makefile
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the ntfs filesystem support.
+#
+
+# to check robot warnings
+ccflags-y += -Wint-to-pointer-cast \
+ $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \
+ $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration)
+
+obj-$(CONFIG_NTFS_FS) += ntfs.o
+
+ntfs-y := aops.o attrib.o collate.o dir.o file.o index.o inode.o \
+ mft.o mst.o namei.o runlist.o super.o unistr.o attrlist.o ea.o \
+ upcase.o bitmap.o lcnalloc.o logfile.o reparse.o compress.o \
+ iomap.o debug.o sysctl.o quota.o
+
+ccflags-$(CONFIG_NTFS_DEBUG) += -DDEBUG
--
2.25.1
On Mon, Dec 29, 2025 at 07:59:31PM +0900, Namjae Jeon wrote: > +++ b/fs/ntfs/Makefile > @@ -0,0 +1,18 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Makefile for the ntfs filesystem support. > +# > + > +# to check robot warnings What does this comment mean? I see ntfs3 also has this, so was this a case of blindly copying? > +ccflags-y += -Wint-to-pointer-cast \ > + $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \ > + $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration) -Wint-to-pointer-cast is already enabled by default, -Wunused-but-set-variable is enabled by -Wall, so both of these can be dropped I think.
On Tue, Dec 30, 2025 at 1:38 AM Matthew Wilcox <willy@infradead.org> wrote: > > On Mon, Dec 29, 2025 at 07:59:31PM +0900, Namjae Jeon wrote: > > +++ b/fs/ntfs/Makefile > > @@ -0,0 +1,18 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +# > > +# Makefile for the ntfs filesystem support. > > +# > > + > > +# to check robot warnings > > What does this comment mean? I see ntfs3 also has this, so was this a > case of blindly copying? Yes, It is added while syncing with ntfs3. I'll remove it. > > > +ccflags-y += -Wint-to-pointer-cast \ > > + $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \ > > + $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration) > > -Wint-to-pointer-cast is already enabled by default, > -Wunused-but-set-variable is enabled by -Wall, so both of these can be > dropped I think. Okay, I will remove it also. Thanks for your review! >
On Mon, Dec 29, 2025 at 1:02 PM Namjae Jeon <linkinjeon@kernel.org> wrote: > > This adds the Kconfig and Makefile Worth throwing in a word about the mutual exclusiveness of ntfs/ntfs3 as built in default driver. > > Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> > --- > fs/Kconfig | 18 ++++++++++++++++++ > fs/Makefile | 1 + > fs/ntfs/Kconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > fs/ntfs/Makefile | 18 ++++++++++++++++++ > 4 files changed, 83 insertions(+) > create mode 100644 fs/ntfs/Kconfig > create mode 100644 fs/ntfs/Makefile > > diff --git a/fs/Kconfig b/fs/Kconfig > index 0bfdaecaa877..c57cb6a53baf 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -152,8 +152,26 @@ menu "DOS/FAT/EXFAT/NT Filesystems" > > source "fs/fat/Kconfig" > source "fs/exfat/Kconfig" > +source "fs/ntfs/Kconfig" > source "fs/ntfs3/Kconfig" > > +choice > + prompt "Select built-in NTFS filesystem (only one can be built-in)" > + default DEFAULT_NTFS > + help > + Only one NTFS can be built into the kernel(y) when selecting a > + specific default. Both can still be built as modules(m). > + > + config DEFAULT_NTFS_NONE > + bool "No built-in restriction (allows both drivers as 'y')" as m? > + > + config DEFAULT_NTFS > + bool "NTFS" > + > + config DEFAULT_NTFS3 > + bool "NTFS3" > +endchoice > + > endmenu > endif # BLOCK > > diff --git a/fs/Makefile b/fs/Makefile > index a04274a3c854..6893496697c4 100644 > --- a/fs/Makefile > +++ b/fs/Makefile > @@ -90,6 +90,7 @@ obj-$(CONFIG_NLS) += nls/ > obj-y += unicode/ > obj-$(CONFIG_SMBFS) += smb/ > obj-$(CONFIG_HPFS_FS) += hpfs/ > +obj-$(CONFIG_NTFS_FS) += ntfs/ > obj-$(CONFIG_NTFS3_FS) += ntfs3/ > obj-$(CONFIG_UFS_FS) += ufs/ > obj-$(CONFIG_EFS_FS) += efs/ > diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig > new file mode 100644 > index 000000000000..ef14c68ed36c > --- /dev/null > +++ b/fs/ntfs/Kconfig > @@ -0,0 +1,46 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +config NTFS_FS > + tristate "NTFS file system support" > + depends on !DEFAULT_NTFS3 || m I am not seeing similar change to fs/ntfs3/Kconfig Thanks, Amir. > + select NLS > + help > + NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003. > + This allows you to mount devices formatted with the ntfs file system. > + > + To compile this as a module, choose M here: the module will be called > + ntfs. > + > +config NTFS_DEBUG > + bool "NTFS debugging support" > + depends on NTFS_FS > + help > + If you are experiencing any problems with the NTFS file system, say > + Y here. This will result in additional consistency checks to be > + performed by the driver as well as additional debugging messages to > + be written to the system log. Note that debugging messages are > + disabled by default. To enable them, supply the option debug_msgs=1 > + at the kernel command line when booting the kernel or as an option > + to insmod when loading the ntfs module. Once the driver is active, > + you can enable debugging messages by doing (as root): > + echo 1 > /proc/sys/fs/ntfs-debug > + Replacing the "1" with "0" would disable debug messages. > + > + If you leave debugging messages disabled, this results in little > + overhead, but enabling debug messages results in very significant > + slowdown of the system. > + > + When reporting bugs, please try to have available a full dump of > + debugging messages while the misbehaviour was occurring. > + > +config NTFS_FS_POSIX_ACL > + bool "NTFS POSIX Access Control Lists" > + depends on NTFS_FS > + select FS_POSIX_ACL > + help > + POSIX Access Control Lists (ACLs) support additional access rights > + for users and groups beyond the standard owner/group/world scheme, > + and this option selects support for ACLs specifically for ntfs > + filesystems. > + NOTE: this is linux only feature. Windows will ignore these ACLs. > + > + If you don't know what Access Control Lists are, say N. > diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile > new file mode 100644 > index 000000000000..01faad8cbbc9 > --- /dev/null > +++ b/fs/ntfs/Makefile > @@ -0,0 +1,18 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Makefile for the ntfs filesystem support. > +# > + > +# to check robot warnings > +ccflags-y += -Wint-to-pointer-cast \ > + $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \ > + $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration) > + > +obj-$(CONFIG_NTFS_FS) += ntfs.o > + > +ntfs-y := aops.o attrib.o collate.o dir.o file.o index.o inode.o \ > + mft.o mst.o namei.o runlist.o super.o unistr.o attrlist.o ea.o \ > + upcase.o bitmap.o lcnalloc.o logfile.o reparse.o compress.o \ > + iomap.o debug.o sysctl.o quota.o > + > +ccflags-$(CONFIG_NTFS_DEBUG) += -DDEBUG > -- > 2.25.1 >
On Mon, Dec 29, 2025 at 11:11 PM Amir Goldstein <amir73il@gmail.com> wrote: > > On Mon, Dec 29, 2025 at 1:02 PM Namjae Jeon <linkinjeon@kernel.org> wrote: > > > > This adds the Kconfig and Makefile > > Worth throwing in a word about the mutual exclusiveness of > ntfs/ntfs3 as built in default driver. Okay, I will update it on v4. > > > > > Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> > > --- > > fs/Kconfig | 18 ++++++++++++++++++ > > fs/Makefile | 1 + > > fs/ntfs/Kconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > > fs/ntfs/Makefile | 18 ++++++++++++++++++ > > 4 files changed, 83 insertions(+) > > create mode 100644 fs/ntfs/Kconfig > > create mode 100644 fs/ntfs/Makefile > > > > diff --git a/fs/Kconfig b/fs/Kconfig > > index 0bfdaecaa877..c57cb6a53baf 100644 > > --- a/fs/Kconfig > > +++ b/fs/Kconfig > > @@ -152,8 +152,26 @@ menu "DOS/FAT/EXFAT/NT Filesystems" > > > > source "fs/fat/Kconfig" > > source "fs/exfat/Kconfig" > > +source "fs/ntfs/Kconfig" > > source "fs/ntfs3/Kconfig" > > > > +choice > > + prompt "Select built-in NTFS filesystem (only one can be built-in)" > > + default DEFAULT_NTFS > > + help > > + Only one NTFS can be built into the kernel(y) when selecting a > > + specific default. Both can still be built as modules(m). > > + > > + config DEFAULT_NTFS_NONE > > + bool "No built-in restriction (allows both drivers as 'y')" > > as m? Right. > > > + > > + config DEFAULT_NTFS > > + bool "NTFS" > > + > > + config DEFAULT_NTFS3 > > + bool "NTFS3" > > +endchoice > > + > > endmenu > > endif # BLOCK > > > > diff --git a/fs/Makefile b/fs/Makefile > > index a04274a3c854..6893496697c4 100644 > > --- a/fs/Makefile > > +++ b/fs/Makefile > > @@ -90,6 +90,7 @@ obj-$(CONFIG_NLS) += nls/ > > obj-y += unicode/ > > obj-$(CONFIG_SMBFS) += smb/ > > obj-$(CONFIG_HPFS_FS) += hpfs/ > > +obj-$(CONFIG_NTFS_FS) += ntfs/ > > obj-$(CONFIG_NTFS3_FS) += ntfs3/ > > obj-$(CONFIG_UFS_FS) += ufs/ > > obj-$(CONFIG_EFS_FS) += efs/ > > diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig > > new file mode 100644 > > index 000000000000..ef14c68ed36c > > --- /dev/null > > +++ b/fs/ntfs/Kconfig > > @@ -0,0 +1,46 @@ > > +# SPDX-License-Identifier: GPL-2.0-only > > +config NTFS_FS > > + tristate "NTFS file system support" > > + depends on !DEFAULT_NTFS3 || m > > > I am not seeing similar change to fs/ntfs3/Kconfig Yes, I am missing it. I will add it on v4. Thanks for your review! > > Thanks, > Amir. > > > + select NLS > > + help > > + NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003. > > + This allows you to mount devices formatted with the ntfs file system. > > + > > + To compile this as a module, choose M here: the module will be called > > + ntfs. > > + > > +config NTFS_DEBUG > > + bool "NTFS debugging support" > > + depends on NTFS_FS > > + help > > + If you are experiencing any problems with the NTFS file system, say > > + Y here. This will result in additional consistency checks to be > > + performed by the driver as well as additional debugging messages to > > + be written to the system log. Note that debugging messages are > > + disabled by default. To enable them, supply the option debug_msgs=1 > > + at the kernel command line when booting the kernel or as an option > > + to insmod when loading the ntfs module. Once the driver is active, > > + you can enable debugging messages by doing (as root): > > + echo 1 > /proc/sys/fs/ntfs-debug > > + Replacing the "1" with "0" would disable debug messages. > > + > > + If you leave debugging messages disabled, this results in little > > + overhead, but enabling debug messages results in very significant > > + slowdown of the system. > > + > > + When reporting bugs, please try to have available a full dump of > > + debugging messages while the misbehaviour was occurring. > > + > > +config NTFS_FS_POSIX_ACL > > + bool "NTFS POSIX Access Control Lists" > > + depends on NTFS_FS > > + select FS_POSIX_ACL > > + help > > + POSIX Access Control Lists (ACLs) support additional access rights > > + for users and groups beyond the standard owner/group/world scheme, > > + and this option selects support for ACLs specifically for ntfs > > + filesystems. > > + NOTE: this is linux only feature. Windows will ignore these ACLs. > > + > > + If you don't know what Access Control Lists are, say N. > > diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile > > new file mode 100644 > > index 000000000000..01faad8cbbc9 > > --- /dev/null > > +++ b/fs/ntfs/Makefile > > @@ -0,0 +1,18 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +# > > +# Makefile for the ntfs filesystem support. > > +# > > + > > +# to check robot warnings > > +ccflags-y += -Wint-to-pointer-cast \ > > + $(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \ > > + $(call cc-option,-Wold-style-declaration,-Wout-of-line-declaration) > > + > > +obj-$(CONFIG_NTFS_FS) += ntfs.o > > + > > +ntfs-y := aops.o attrib.o collate.o dir.o file.o index.o inode.o \ > > + mft.o mst.o namei.o runlist.o super.o unistr.o attrlist.o ea.o \ > > + upcase.o bitmap.o lcnalloc.o logfile.o reparse.o compress.o \ > > + iomap.o debug.o sysctl.o quota.o > > + > > +ccflags-$(CONFIG_NTFS_DEBUG) += -DDEBUG > > -- > > 2.25.1 > >
© 2016 - 2026 Red Hat, Inc.