]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ntfs: add Kconfig and Makefile
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 2 Feb 2026 07:00:57 +0000 (16:00 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Thu, 19 Feb 2026 12:51:00 +0000 (21:51 +0900)
Introduce Kconfig and Makefile for remade ntfs.
And this patch make ntfs and ntfs3 mutually exclusive so only one can be
built-in(y), while both can still be built as modules(m).

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/Kconfig
fs/Makefile
fs/ntfs/Kconfig [new file with mode: 0644]
fs/ntfs/Makefile [new file with mode: 0644]
fs/ntfs3/Kconfig

index 0bfdaecaa87751e0283b29b8056f316e002e5b3e..43cb06de297ffc6ee08d9bee5370bb6bf5d2b5ae 100644 (file)
@@ -152,6 +152,7 @@ menu "DOS/FAT/EXFAT/NT Filesystems"
 
 source "fs/fat/Kconfig"
 source "fs/exfat/Kconfig"
+source "fs/ntfs/Kconfig"
 source "fs/ntfs3/Kconfig"
 
 endmenu
index cf4a745e9679848d633749d281bac0a06d2cf7b4..ae1b07f9c6a0cce76be1ad6f1396423cdd0e274b 100644 (file)
@@ -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 (file)
index 0000000..e5fd137
--- /dev/null
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config NTFS_FS
+       tristate "NTFS file system support"
+       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.
+
+         This option enables ACL support for ntfs, providing functional parity
+         with ntfs3 drivier.
+
+         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 (file)
index 0000000..0ce4d9a
--- /dev/null
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0
+
+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 object_id.o bdev-io.o
+
+ccflags-$(CONFIG_NTFS_DEBUG) += -DDEBUG
index cdfdf51e55d797e0e5fecc349e2f157f09fea7d8..876dbc613ae6dee70b8844d25553c739a17df978 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config NTFS3_FS
        tristate "NTFS Read-Write file system support"
+       depends on !NTFS_FS || m
        select BUFFER_HEAD
        select NLS
        select LEGACY_DIRECT_IO