Skip to contentSkip to conversation

ntfsplus: ntfs filesystem remake

PATCH Superseded Namjae Jeon 8 participants 46 messages Nov 27, 2025 – Dec 3, 2025 Page 2 of 2

Subsystems (3)

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#35 lore raw

Re: [PATCH v2 11/11] ntfsplus: add Kconfig and Makefile

In reply to Amir Goldstein
Quoted 36 lines
Quoted 6 lines
Quoted 4 lines

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

Quoted 27 lines

Thanks!

Quoted 3 lines

Thanks,
Amir.

From 11154917ff53d6cf218ac58e6776e603246587b6 Mon Sep 17 00:00:00 2001
From: Namjae Jeon <[email protected]>
Date: Fri, 28 Nov 2025 11:44:45 +0900
Subject: [PATCH] ntfs: restrict built-in NTFS seclection to one driver, allow
both as modules

---
 fs/Kconfig          | 11 +++++++++++
 fs/ntfs3/Kconfig    |  2 ++
 fs/ntfsplus/Kconfig |  1 +
 3 files changed, 14 insertions(+)
fs/Kconfig +0 -0
index 70d596b99c8b..c379383cb4ff 100644
@@ -155,6 +155,17 @@ source "fs/exfat/Kconfig"
 source "fs/ntfs3/Kconfig"
 source "fs/ntfsplus/Kconfig"
 
Quoted 4 lines

fs/Kconfig source "fs/exfat/Kconfig" · line 159

Quoted 2 lines
fs/Kconfig +2 -0
+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.

Quoted 8 lines

fs/Kconfig source "fs/exfat/Kconfig" · line 165

Quoted 7 lines
fs/Kconfig +6 -0
+   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.

Quoted 20 lines
Quoted 12 lines
fs/Kconfig +3 -0
+   config DEFAULT_NTFS3
+       bool "NTFS3"
+endchoice
 endmenu
 endif # BLOCK
 
fs/ntfs3/Kconfig +0 -0
index 7bc31d69f680..18bd6c98c6eb 100644

fs/ntfs3/Kconfig line 4

Quoted 4 lines
fs/ntfs3/Kconfig +1 -0
@@ -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

Quoted 1 line
        depends on NTFS_FS != y || m

Okay.

Quoted 6 lines
Quoted 6 lines
fs/ntfs3/Kconfig +0 -0
      select BUFFER_HEAD
      select NLS
      select LEGACY_DIRECT_IO
@@ -49,6 +50,7 @@ config NTFS3_FS_POSIX_ACL
 
Quoted 7 lines

fs/ntfs3/Kconfig config NTFS3_FS_POSIX_ACL · line 51

Quoted 1 line
fs/ntfs3/Kconfig +0 -0
 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.

Quoted 19 lines
Quoted 11 lines
fs/ntfs3/Kconfig +1 -0
      tristate "NTFS file system support"
+     depends on !DEFAULT_NTFSPLUS || m
      select NTFS3_FS
      select BUFFER_HEAD
      select NLS
fs/ntfsplus/Kconfig +0 -0
index 78bc34840463..c8d1ab99113c 100644

fs/ntfsplus/Kconfig line 4

Quoted 4 lines
fs/ntfsplus/Kconfig +1 -0
@@ -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
Quoted 7 lines

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!

Quoted 3 lines

Thanks,
Amir.

#36 lore raw
In reply to Namjae Jeon
Quoted 4 lines · Namjae Jeon

Introduction
============

Quoted 8 lines

The NTFS filesystem[1] still remains the default filesystem for Windows and The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices, making it easier for Linux users to work with NTFS-formatted drives. Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3. ntfs3 still has many problems and is poorly maintained, so users and distributions are still using the old legacy ntfs-3g.

May I suggest that you add a patch to your series to add a deprecation message to ntfs3?

See for example eb103a51640ee ("reiserfs: Deprecate reiserfs")

Quoted 5 lines

What is ntfsplus?
=================

Quoted 9 lines

The remade ntfs called ntfsplus is an implementation that supports write and the essential requirements(iomap, no buffer-head, utilities, xfstests test result) based on read-only classic NTFS.
The old read-only ntfs code is much cleaner, with extensive comments, offers readability that makes understanding NTFS easier. This is why ntfsplus was developed on old read-only NTFS base.
The target is to provide current trends(iomap, no buffer head, folio), enhanced performance, stable maintenance, utility support including fsck.

You are bringing back the old ntfs driver code from the dead, preserving the code and Copyrights and everything to bring it up to speed with modern vfs API and to add super nice features. Right?

Apart from its history, the new refurbished ntfs driver is also fully backward compact to the old read-only driver. Right?

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Do you have any objections to leaving its original ntfs name?

You can also do:
MODULE_ALIAS_FS("ntfs");
MODULE_ALIAS_FS("ntfsplus");

If that is useful for ntfsprogs-plus somehow.

Thanks,
Amir.

Quoted 249 lines

Key Features
============

- Write support:
Implement write support on classic read-only NTFS. Additionally, integrate delayed allocation to enhance write performance through multi-cluster allocation and minimized fragmentation of cluster bitmap.

- Switch to using iomap:
Use iomap for buffered IO writes, reads, direct IO, file extent mapping, readpages, writepages operations.

- Stop using the buffer head:
The use of buffer head in old ntfs and switched to use folio instead. As a result, CONFIG_BUFFER_HEAD option enable is removed in Kconfig also.

- Public utilities include fsck[2]:
While ntfs-3g includes ntfsprogs as a component, it notably lacks the fsck implementation. So we have launched a new ntfs utilitiies project called ntfsprogs-plus by forking from ntfs-3g after removing unnecessary ntfs fuse implementation. fsck.ntfs can be used for ntfs testing with xfstests as well as for recovering corrupted NTFS device.

- Performance Enhancements:

- ntfsplus vs. ntfs3:

* Performance was benchmarked using iozone with various chunk size.
- In single-thread(1T) write tests, ntfsplus show approximately 3~5% better performance.
- In multi-thread(4T) write tests, ntfsplus show approximately 35~110% better performance.
- Read throughput is identical for both ntfs implementations.

1GB file size:4096 size:16384 size:65536
MB/sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
read 399 | 399 426 | 424 429 | 430
─────────────────────────────────────────────────────────────────
write(1T) 291 | 276 325 | 305 333 | 317
write(4T) 105 | 50 113 | 78 114 | 99.6

* File list browsing performance. (about 12~14% faster)

files:100000 files:200000 files:400000
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
ls -lR 7.07 | 8.10 14.03 | 16.35 28.27 | 32.86

* mount time.

parti_size:1TB parti_size:2TB parti_size:4TB
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
mount 0.38 | 2.03 0.39 | 2.25 0.70 | 4.51

The following are the reasons why ntfsplus performance is higher
compared to ntfs3:
- Use iomap aops.
- Delayed allocation support.
- Optimize zero out for newly allocated clusters.
- Optimize runlist merge overhead with small chunck size.
- pre-load mft(inode) blocks and index(dentry) blocks to improve readdir + stat performance.
- Load lcn bitmap on background.

- Stability improvement:
a. Pass more xfstests tests:
ntfsplus passed 287 tests, significantly higher than ntfs3's 218. ntfsplus implement fallocate, idmapped mount and permission, etc, resulting in a significantly high number of xfstests passing compared to ntfs3.
b. Bonnie++ issue[3]:
The Bonnie++ benchmark fails on ntfs3 with a "Directory not empty" error during file deletion. ntfs3 currently iterates directory entries by reading index blocks one by one. When entries are deleted concurrently, index block merging or entry relocation can cause readdir() to skip some entries, leaving files undeleted in workloads(bonnie++) that mix unlink and directory scans. ntfsplus implement leaf chain traversal in readdir to avoid entry skip on deletion.

- Journaling support:
ntfs3 does not provide full journaling support. It only implement journal replay[4], which in our testing did not function correctly. My next task after upstreaming will be to add full journal support to ntfsplus.

The feature comparison summary
==============================

Feature                               ntfsplus   ntfs3
===================================   ========   ===========
Write support                         Yes        Yes
iomap support                         Yes        No
No buffer head                        Yes        No
Public utilities(mkfs, fsck, etc.)    Yes        No
xfstests passed                       287        218
Idmapped mount                        Yes        No
Delayed allocation                    Yes        No
Bonnie++                              Pass       Fail
Journaling                            Planned    Inoperative
===================================   ========   ===========

References
==========
[1] https://en.wikipedia.org/wiki/NTFS
[2] https://github.com/ntfsprogs-plus/ntfsprogs-plus
[3] https://lore.kernel.org/ntfs3/CAOZgwEd7NDkGEpdF6UQTcbYuupDavaHBoj4WwTy3Qe4Bqm6V0g@mail.gmail.com/
[4] https://marc.info/?l=linux-fsdevel&m=161738417018673&q=mbox

Available in the Git repository at:
===================================
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git ntfs-next

v2:
- Add ntfs3-compatible mount options(sys_immutable, nohidden, hide_dot_files, nocase, acl, windows_names, disable_sparse, discard).
- Add iocharset mount option.
- Add ntfs3-compatible dos attribute and ntfs attribute load/store in setxattr/getattr().
- Add support for FS_IOC_{GET,SET}FSLABEL ioctl.
- Add support for FITRIM ioctl.
- Fix the warnings(duplicate symbol, __divdi3, etc) from kernel test robot.
- Prefix pr_xxx() with ntfsplus.
- Add support for $MFT File extension.
- Add Documentation/filesystems/ntfsplus.rst.
- Mark experimental.
- Remove BUG traps warnings from checkpatch.pl.

Namjae Jeon (11):
ntfsplus: in-memory, on-disk structures and headers
ntfsplus: add super block operations
ntfsplus: add inode operations
ntfsplus: add directory operations
ntfsplus: add file operations
ntfsplus: add iomap and address space operations
ntfsplus: add attrib operatrions
ntfsplus: add runlist handling and cluster allocator
ntfsplus: add reparse and ea operations
ntfsplus: add misc operations
ntfsplus: add Kconfig and Makefile

 Documentation/filesystems/index.rst    |    1 +
 Documentation/filesystems/ntfsplus.rst |  199 +
 fs/Kconfig                             |    1 +
 fs/Makefile                            |    1 +
 fs/ntfsplus/Kconfig                    |   45 +
 fs/ntfsplus/Makefile                   |   18 +
 fs/ntfsplus/aops.c                     |  617 +++
 fs/ntfsplus/aops.h                     |   92 +
 fs/ntfsplus/attrib.c                   | 5377 ++++++++++++++++++++++++
 fs/ntfsplus/attrib.h                   |  159 +
 fs/ntfsplus/attrlist.c                 |  285 ++
 fs/ntfsplus/attrlist.h                 |   21 +
 fs/ntfsplus/bitmap.c                   |  290 ++
 fs/ntfsplus/bitmap.h                   |   93 +
 fs/ntfsplus/collate.c                  |  178 +
 fs/ntfsplus/collate.h                  |   37 +
 fs/ntfsplus/compress.c                 | 1564 +++++++
 fs/ntfsplus/dir.c                      | 1230 ++++++
 fs/ntfsplus/dir.h                      |   33 +
 fs/ntfsplus/ea.c                       |  931 ++++
 fs/ntfsplus/ea.h                       |   25 +
 fs/ntfsplus/file.c                     | 1142 +++++
 fs/ntfsplus/index.c                    | 2112 ++++++++++
 fs/ntfsplus/index.h                    |  127 +
 fs/ntfsplus/inode.c                    | 3729 ++++++++++++++++
 fs/ntfsplus/inode.h                    |  353 ++
 fs/ntfsplus/layout.h                   | 2288 ++++++++++
 fs/ntfsplus/lcnalloc.c                 | 1012 +++++
 fs/ntfsplus/lcnalloc.h                 |  127 +
 fs/ntfsplus/logfile.c                  |  770 ++++
 fs/ntfsplus/logfile.h                  |  316 ++
 fs/ntfsplus/mft.c                      | 2698 ++++++++++++
 fs/ntfsplus/mft.h                      |   92 +
 fs/ntfsplus/misc.c                     |  213 +
 fs/ntfsplus/misc.h                     |  218 +
 fs/ntfsplus/mst.c                      |  195 +
 fs/ntfsplus/namei.c                    | 1677 ++++++++
 fs/ntfsplus/ntfs.h                     |  180 +
 fs/ntfsplus/ntfs_iomap.c               |  700 +++
 fs/ntfsplus/ntfs_iomap.h               |   22 +
 fs/ntfsplus/reparse.c                  |  550 +++
 fs/ntfsplus/reparse.h                  |   15 +
 fs/ntfsplus/runlist.c                  | 1983 +++++++++
 fs/ntfsplus/runlist.h                  |   91 +
 fs/ntfsplus/super.c                    | 2865 +++++++++++++
 fs/ntfsplus/unistr.c                   |  473 +++
 fs/ntfsplus/upcase.c                   |   73 +
 fs/ntfsplus/volume.h                   |  254 ++
 include/uapi/linux/ntfs.h              |   23 +
 49 files changed, 35495 insertions(+)
 create mode 100644 Documentation/filesystems/ntfsplus.rst
 create mode 100644 fs/ntfsplus/Kconfig
 create mode 100644 fs/ntfsplus/Makefile
 create mode 100644 fs/ntfsplus/aops.c
 create mode 100644 fs/ntfsplus/aops.h
 create mode 100644 fs/ntfsplus/attrib.c
 create mode 100644 fs/ntfsplus/attrib.h
 create mode 100644 fs/ntfsplus/attrlist.c
 create mode 100644 fs/ntfsplus/attrlist.h
 create mode 100644 fs/ntfsplus/bitmap.c
 create mode 100644 fs/ntfsplus/bitmap.h
 create mode 100644 fs/ntfsplus/collate.c
 create mode 100644 fs/ntfsplus/collate.h
 create mode 100644 fs/ntfsplus/compress.c
 create mode 100644 fs/ntfsplus/dir.c
 create mode 100644 fs/ntfsplus/dir.h
 create mode 100644 fs/ntfsplus/ea.c
 create mode 100644 fs/ntfsplus/ea.h
 create mode 100644 fs/ntfsplus/file.c
 create mode 100644 fs/ntfsplus/index.c
 create mode 100644 fs/ntfsplus/index.h
 create mode 100644 fs/ntfsplus/inode.c
 create mode 100644 fs/ntfsplus/inode.h
 create mode 100644 fs/ntfsplus/layout.h
 create mode 100644 fs/ntfsplus/lcnalloc.c
 create mode 100644 fs/ntfsplus/lcnalloc.h
 create mode 100644 fs/ntfsplus/logfile.c
 create mode 100644 fs/ntfsplus/logfile.h
 create mode 100644 fs/ntfsplus/mft.c
 create mode 100644 fs/ntfsplus/mft.h
 create mode 100644 fs/ntfsplus/misc.c
 create mode 100644 fs/ntfsplus/misc.h
 create mode 100644 fs/ntfsplus/mst.c
 create mode 100644 fs/ntfsplus/namei.c
 create mode 100644 fs/ntfsplus/ntfs.h
 create mode 100644 fs/ntfsplus/ntfs_iomap.c
 create mode 100644 fs/ntfsplus/ntfs_iomap.h
 create mode 100644 fs/ntfsplus/reparse.c
 create mode 100644 fs/ntfsplus/reparse.h
 create mode 100644 fs/ntfsplus/runlist.c
 create mode 100644 fs/ntfsplus/runlist.h
 create mode 100644 fs/ntfsplus/super.c
 create mode 100644 fs/ntfsplus/unistr.c
 create mode 100644 fs/ntfsplus/upcase.c
 create mode 100644 fs/ntfsplus/volume.h
 create mode 100644 include/uapi/linux/ntfs.h

--
2.25.1

#37 lore raw
Quoted 6 lines · Amir Goldstein
Quoted 4 lines · Namjae Jeon

Introduction
============

Quoted 9 lines
Quoted 8 lines

The NTFS filesystem[1] still remains the default filesystem for Windows and The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices, making it easier for Linux users to work with NTFS-formatted drives. Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3. ntfs3 still has many problems and is poorly maintained, so users and distributions are still using the old legacy ntfs-3g.

Hi Amir,

Quoted 4 lines

May I suggest that you add a patch to your series to add a deprecation message to ntfs3?

See for example eb103a51640ee ("reiserfs: Deprecate reiserfs")

Okay, I'll add it in the next version, referring to this reiserfs patch.

Quoted 16 lines
Quoted 6 lines

What is ntfsplus?
=================

Quoted 9 lines

The remade ntfs called ntfsplus is an implementation that supports write and the essential requirements(iomap, no buffer-head, utilities, xfstests test result) based on read-only classic NTFS.
The old read-only ntfs code is much cleaner, with extensive comments, offers readability that makes understanding NTFS easier. This is why ntfsplus was developed on old read-only NTFS base.
The target is to provide current trends(iomap, no buffer head, folio), enhanced performance, stable maintenance, utility support including fsck.

Quoted 3 lines

You are bringing back the old ntfs driver code from the dead, preserving the code and Copyrights and everything to bring it up to speed with modern vfs API and to add super nice features. Right?

Yes.

Quoted 3 lines

Apart from its history, the new refurbished ntfs driver is also fully backward compact to the old read-only driver. Right?

Yes.

Quoted 6 lines

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Right, I wanted to rebrand ntfsprogs-plus and ntfsplus into a paired set of names. Also, ntfs3 was already used as an alias for ntfs, so I couldn't touch ntfs3 driver without consensus from the fs maintainers.

Quoted 2 lines

Do you have any objections to leaving its original ntfs name?

I have no objection to using ntfsplus as an alias for ntfs if we add a deprecation message to ntfs3.

Quoted 4 lines

You can also do:
MODULE_ALIAS_FS("ntfs");
MODULE_ALIAS_FS("ntfsplus");

I will add this in the next version with ntfs3 deprecation patch.

Quoted 2 lines

If that is useful for ntfsprogs-plus somehow.

That is very useful and thanks for your review!

Quoted 253 lines

Thanks,
Amir.

Quoted 249 lines

Key Features
============

- Write support:
Implement write support on classic read-only NTFS. Additionally, integrate delayed allocation to enhance write performance through multi-cluster allocation and minimized fragmentation of cluster bitmap.

- Switch to using iomap:
Use iomap for buffered IO writes, reads, direct IO, file extent mapping, readpages, writepages operations.

- Stop using the buffer head:
The use of buffer head in old ntfs and switched to use folio instead. As a result, CONFIG_BUFFER_HEAD option enable is removed in Kconfig also.

- Public utilities include fsck[2]:
While ntfs-3g includes ntfsprogs as a component, it notably lacks the fsck implementation. So we have launched a new ntfs utilitiies project called ntfsprogs-plus by forking from ntfs-3g after removing unnecessary ntfs fuse implementation. fsck.ntfs can be used for ntfs testing with xfstests as well as for recovering corrupted NTFS device.

- Performance Enhancements:

- ntfsplus vs. ntfs3:

* Performance was benchmarked using iozone with various chunk size.
- In single-thread(1T) write tests, ntfsplus show approximately 3~5% better performance.
- In multi-thread(4T) write tests, ntfsplus show approximately 35~110% better performance.
- Read throughput is identical for both ntfs implementations.

1GB file size:4096 size:16384 size:65536
MB/sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
read 399 | 399 426 | 424 429 | 430
─────────────────────────────────────────────────────────────────
write(1T) 291 | 276 325 | 305 333 | 317
write(4T) 105 | 50 113 | 78 114 | 99.6

* File list browsing performance. (about 12~14% faster)

files:100000 files:200000 files:400000
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
ls -lR 7.07 | 8.10 14.03 | 16.35 28.27 | 32.86

* mount time.

parti_size:1TB parti_size:2TB parti_size:4TB
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
mount 0.38 | 2.03 0.39 | 2.25 0.70 | 4.51

The following are the reasons why ntfsplus performance is higher
compared to ntfs3:
- Use iomap aops.
- Delayed allocation support.
- Optimize zero out for newly allocated clusters.
- Optimize runlist merge overhead with small chunck size.
- pre-load mft(inode) blocks and index(dentry) blocks to improve readdir + stat performance.
- Load lcn bitmap on background.

- Stability improvement:
a. Pass more xfstests tests:
ntfsplus passed 287 tests, significantly higher than ntfs3's 218. ntfsplus implement fallocate, idmapped mount and permission, etc, resulting in a significantly high number of xfstests passing compared to ntfs3.
b. Bonnie++ issue[3]:
The Bonnie++ benchmark fails on ntfs3 with a "Directory not empty" error during file deletion. ntfs3 currently iterates directory entries by reading index blocks one by one. When entries are deleted concurrently, index block merging or entry relocation can cause readdir() to skip some entries, leaving files undeleted in workloads(bonnie++) that mix unlink and directory scans. ntfsplus implement leaf chain traversal in readdir to avoid entry skip on deletion.

- Journaling support:
ntfs3 does not provide full journaling support. It only implement journal replay[4], which in our testing did not function correctly. My next task after upstreaming will be to add full journal support to ntfsplus.

The feature comparison summary
==============================

Feature                               ntfsplus   ntfs3
===================================   ========   ===========
Write support                         Yes        Yes
iomap support                         Yes        No
No buffer head                        Yes        No
Public utilities(mkfs, fsck, etc.)    Yes        No
xfstests passed                       287        218
Idmapped mount                        Yes        No
Delayed allocation                    Yes        No
Bonnie++                              Pass       Fail
Journaling                            Planned    Inoperative
===================================   ========   ===========

References
==========
[1] https://en.wikipedia.org/wiki/NTFS
[2] https://github.com/ntfsprogs-plus/ntfsprogs-plus
[3] https://lore.kernel.org/ntfs3/CAOZgwEd7NDkGEpdF6UQTcbYuupDavaHBoj4WwTy3Qe4Bqm6V0g@mail.gmail.com/
[4] https://marc.info/?l=linux-fsdevel&m=161738417018673&q=mbox

Available in the Git repository at:
===================================
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git ntfs-next

v2:
- Add ntfs3-compatible mount options(sys_immutable, nohidden, hide_dot_files, nocase, acl, windows_names, disable_sparse, discard).
- Add iocharset mount option.
- Add ntfs3-compatible dos attribute and ntfs attribute load/store in setxattr/getattr().
- Add support for FS_IOC_{GET,SET}FSLABEL ioctl.
- Add support for FITRIM ioctl.
- Fix the warnings(duplicate symbol, __divdi3, etc) from kernel test robot.
- Prefix pr_xxx() with ntfsplus.
- Add support for $MFT File extension.
- Add Documentation/filesystems/ntfsplus.rst.
- Mark experimental.
- Remove BUG traps warnings from checkpatch.pl.

Namjae Jeon (11):
ntfsplus: in-memory, on-disk structures and headers
ntfsplus: add super block operations
ntfsplus: add inode operations
ntfsplus: add directory operations
ntfsplus: add file operations
ntfsplus: add iomap and address space operations
ntfsplus: add attrib operatrions
ntfsplus: add runlist handling and cluster allocator
ntfsplus: add reparse and ea operations
ntfsplus: add misc operations
ntfsplus: add Kconfig and Makefile

 Documentation/filesystems/index.rst    |    1 +
 Documentation/filesystems/ntfsplus.rst |  199 +
 fs/Kconfig                             |    1 +
 fs/Makefile                            |    1 +
 fs/ntfsplus/Kconfig                    |   45 +
 fs/ntfsplus/Makefile                   |   18 +
 fs/ntfsplus/aops.c                     |  617 +++
 fs/ntfsplus/aops.h                     |   92 +
 fs/ntfsplus/attrib.c                   | 5377 ++++++++++++++++++++++++
 fs/ntfsplus/attrib.h                   |  159 +
 fs/ntfsplus/attrlist.c                 |  285 ++
 fs/ntfsplus/attrlist.h                 |   21 +
 fs/ntfsplus/bitmap.c                   |  290 ++
 fs/ntfsplus/bitmap.h                   |   93 +
 fs/ntfsplus/collate.c                  |  178 +
 fs/ntfsplus/collate.h                  |   37 +
 fs/ntfsplus/compress.c                 | 1564 +++++++
 fs/ntfsplus/dir.c                      | 1230 ++++++
 fs/ntfsplus/dir.h                      |   33 +
 fs/ntfsplus/ea.c                       |  931 ++++
 fs/ntfsplus/ea.h                       |   25 +
 fs/ntfsplus/file.c                     | 1142 +++++
 fs/ntfsplus/index.c                    | 2112 ++++++++++
 fs/ntfsplus/index.h                    |  127 +
 fs/ntfsplus/inode.c                    | 3729 ++++++++++++++++
 fs/ntfsplus/inode.h                    |  353 ++
 fs/ntfsplus/layout.h                   | 2288 ++++++++++
 fs/ntfsplus/lcnalloc.c                 | 1012 +++++
 fs/ntfsplus/lcnalloc.h                 |  127 +
 fs/ntfsplus/logfile.c                  |  770 ++++
 fs/ntfsplus/logfile.h                  |  316 ++
 fs/ntfsplus/mft.c                      | 2698 ++++++++++++
 fs/ntfsplus/mft.h                      |   92 +
 fs/ntfsplus/misc.c                     |  213 +
 fs/ntfsplus/misc.h                     |  218 +
 fs/ntfsplus/mst.c                      |  195 +
 fs/ntfsplus/namei.c                    | 1677 ++++++++
 fs/ntfsplus/ntfs.h                     |  180 +
 fs/ntfsplus/ntfs_iomap.c               |  700 +++
 fs/ntfsplus/ntfs_iomap.h               |   22 +
 fs/ntfsplus/reparse.c                  |  550 +++
 fs/ntfsplus/reparse.h                  |   15 +
 fs/ntfsplus/runlist.c                  | 1983 +++++++++
 fs/ntfsplus/runlist.h                  |   91 +
 fs/ntfsplus/super.c                    | 2865 +++++++++++++
 fs/ntfsplus/unistr.c                   |  473 +++
 fs/ntfsplus/upcase.c                   |   73 +
 fs/ntfsplus/volume.h                   |  254 ++
 include/uapi/linux/ntfs.h              |   23 +
 49 files changed, 35495 insertions(+)
 create mode 100644 Documentation/filesystems/ntfsplus.rst
 create mode 100644 fs/ntfsplus/Kconfig
 create mode 100644 fs/ntfsplus/Makefile
 create mode 100644 fs/ntfsplus/aops.c
 create mode 100644 fs/ntfsplus/aops.h
 create mode 100644 fs/ntfsplus/attrib.c
 create mode 100644 fs/ntfsplus/attrib.h
 create mode 100644 fs/ntfsplus/attrlist.c
 create mode 100644 fs/ntfsplus/attrlist.h
 create mode 100644 fs/ntfsplus/bitmap.c
 create mode 100644 fs/ntfsplus/bitmap.h
 create mode 100644 fs/ntfsplus/collate.c
 create mode 100644 fs/ntfsplus/collate.h
 create mode 100644 fs/ntfsplus/compress.c
 create mode 100644 fs/ntfsplus/dir.c
 create mode 100644 fs/ntfsplus/dir.h
 create mode 100644 fs/ntfsplus/ea.c
 create mode 100644 fs/ntfsplus/ea.h
 create mode 100644 fs/ntfsplus/file.c
 create mode 100644 fs/ntfsplus/index.c
 create mode 100644 fs/ntfsplus/index.h
 create mode 100644 fs/ntfsplus/inode.c
 create mode 100644 fs/ntfsplus/inode.h
 create mode 100644 fs/ntfsplus/layout.h
 create mode 100644 fs/ntfsplus/lcnalloc.c
 create mode 100644 fs/ntfsplus/lcnalloc.h
 create mode 100644 fs/ntfsplus/logfile.c
 create mode 100644 fs/ntfsplus/logfile.h
 create mode 100644 fs/ntfsplus/mft.c
 create mode 100644 fs/ntfsplus/mft.h
 create mode 100644 fs/ntfsplus/misc.c
 create mode 100644 fs/ntfsplus/misc.h
 create mode 100644 fs/ntfsplus/mst.c
 create mode 100644 fs/ntfsplus/namei.c
 create mode 100644 fs/ntfsplus/ntfs.h
 create mode 100644 fs/ntfsplus/ntfs_iomap.c
 create mode 100644 fs/ntfsplus/ntfs_iomap.h
 create mode 100644 fs/ntfsplus/reparse.c
 create mode 100644 fs/ntfsplus/reparse.h
 create mode 100644 fs/ntfsplus/runlist.c
 create mode 100644 fs/ntfsplus/runlist.h
 create mode 100644 fs/ntfsplus/super.c
 create mode 100644 fs/ntfsplus/unistr.c
 create mode 100644 fs/ntfsplus/upcase.c
 create mode 100644 fs/ntfsplus/volume.h
 create mode 100644 include/uapi/linux/ntfs.h

--
2.25.1

#38 lore raw
Quoted 17 lines · Namjae Jeon
Quoted 6 lines · Amir Goldstein
Quoted 4 lines · Namjae Jeon

Introduction
============

Quoted 9 lines
Quoted 8 lines

The NTFS filesystem[1] still remains the default filesystem for Windows and The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices, making it easier for Linux users to work with NTFS-formatted drives. Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3. ntfs3 still has many problems and is poorly maintained, so users and distributions are still using the old legacy ntfs-3g.

Quoted 7 lines

Hi Amir,

Quoted 4 lines

May I suggest that you add a patch to your series to add a deprecation message to ntfs3?

See for example eb103a51640ee ("reiserfs: Deprecate reiserfs")

Okay, I'll add it in the next version, referring to this reiserfs patch.

Quoted 1 line

There is no need to refer to this patch, there is nothing special about it. It's just an example for you of past deprecation procedures.

Unlike resierfs, the deprecation warning and help text for ntfs3 should refer users to the better in-tree alternative.

Thanks,
Amir.

Quoted 297 lines
Quoted 15 lines
Quoted 5 lines

What is ntfsplus?
=================

Quoted 9 lines

The remade ntfs called ntfsplus is an implementation that supports write and the essential requirements(iomap, no buffer-head, utilities, xfstests test result) based on read-only classic NTFS.
The old read-only ntfs code is much cleaner, with extensive comments, offers readability that makes understanding NTFS easier. This is why ntfsplus was developed on old read-only NTFS base.
The target is to provide current trends(iomap, no buffer head, folio), enhanced performance, stable maintenance, utility support including fsck.

Quoted 3 lines

You are bringing back the old ntfs driver code from the dead, preserving the code and Copyrights and everything to bring it up to speed with modern vfs API and to add super nice features. Right?

Yes.

Quoted 3 lines

Apart from its history, the new refurbished ntfs driver is also fully backward compact to the old read-only driver. Right?

Yes.

Quoted 6 lines

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Right, I wanted to rebrand ntfsprogs-plus and ntfsplus into a paired set of names. Also, ntfs3 was already used as an alias for ntfs, so I couldn't touch ntfs3 driver without consensus from the fs maintainers.

Quoted 2 lines

Do you have any objections to leaving its original ntfs name?

I have no objection to using ntfsplus as an alias for ntfs if we add a deprecation message to ntfs3.

Quoted 4 lines

You can also do:
MODULE_ALIAS_FS("ntfs");
MODULE_ALIAS_FS("ntfsplus");

I will add this in the next version with ntfs3 deprecation patch.

Quoted 2 lines

If that is useful for ntfsprogs-plus somehow.

That is very useful and thanks for your review!

Quoted 253 lines

Thanks,
Amir.

Quoted 249 lines

Key Features
============

- Write support:
Implement write support on classic read-only NTFS. Additionally, integrate delayed allocation to enhance write performance through multi-cluster allocation and minimized fragmentation of cluster bitmap.

- Switch to using iomap:
Use iomap for buffered IO writes, reads, direct IO, file extent mapping, readpages, writepages operations.

- Stop using the buffer head:
The use of buffer head in old ntfs and switched to use folio instead. As a result, CONFIG_BUFFER_HEAD option enable is removed in Kconfig also.

- Public utilities include fsck[2]:
While ntfs-3g includes ntfsprogs as a component, it notably lacks the fsck implementation. So we have launched a new ntfs utilitiies project called ntfsprogs-plus by forking from ntfs-3g after removing unnecessary ntfs fuse implementation. fsck.ntfs can be used for ntfs testing with xfstests as well as for recovering corrupted NTFS device.

- Performance Enhancements:

- ntfsplus vs. ntfs3:

* Performance was benchmarked using iozone with various chunk size.
- In single-thread(1T) write tests, ntfsplus show approximately 3~5% better performance.
- In multi-thread(4T) write tests, ntfsplus show approximately 35~110% better performance.
- Read throughput is identical for both ntfs implementations.

1GB file size:4096 size:16384 size:65536
MB/sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
read 399 | 399 426 | 424 429 | 430
─────────────────────────────────────────────────────────────────
write(1T) 291 | 276 325 | 305 333 | 317
write(4T) 105 | 50 113 | 78 114 | 99.6

* File list browsing performance. (about 12~14% faster)

files:100000 files:200000 files:400000
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
ls -lR 7.07 | 8.10 14.03 | 16.35 28.27 | 32.86

* mount time.

parti_size:1TB parti_size:2TB parti_size:4TB
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
mount 0.38 | 2.03 0.39 | 2.25 0.70 | 4.51

The following are the reasons why ntfsplus performance is higher
compared to ntfs3:
- Use iomap aops.
- Delayed allocation support.
- Optimize zero out for newly allocated clusters.
- Optimize runlist merge overhead with small chunck size.
- pre-load mft(inode) blocks and index(dentry) blocks to improve readdir + stat performance.
- Load lcn bitmap on background.

- Stability improvement:
a. Pass more xfstests tests:
ntfsplus passed 287 tests, significantly higher than ntfs3's 218. ntfsplus implement fallocate, idmapped mount and permission, etc, resulting in a significantly high number of xfstests passing compared to ntfs3.
b. Bonnie++ issue[3]:
The Bonnie++ benchmark fails on ntfs3 with a "Directory not empty" error during file deletion. ntfs3 currently iterates directory entries by reading index blocks one by one. When entries are deleted concurrently, index block merging or entry relocation can cause readdir() to skip some entries, leaving files undeleted in workloads(bonnie++) that mix unlink and directory scans. ntfsplus implement leaf chain traversal in readdir to avoid entry skip on deletion.

- Journaling support:
ntfs3 does not provide full journaling support. It only implement journal replay[4], which in our testing did not function correctly. My next task after upstreaming will be to add full journal support to ntfsplus.

The feature comparison summary
==============================

Feature                               ntfsplus   ntfs3
===================================   ========   ===========
Write support                         Yes        Yes
iomap support                         Yes        No
No buffer head                        Yes        No
Public utilities(mkfs, fsck, etc.)    Yes        No
xfstests passed                       287        218
Idmapped mount                        Yes        No
Delayed allocation                    Yes        No
Bonnie++                              Pass       Fail
Journaling                            Planned    Inoperative
===================================   ========   ===========

References
==========
[1] https://en.wikipedia.org/wiki/NTFS
[2] https://github.com/ntfsprogs-plus/ntfsprogs-plus
[3] https://lore.kernel.org/ntfs3/CAOZgwEd7NDkGEpdF6UQTcbYuupDavaHBoj4WwTy3Qe4Bqm6V0g@mail.gmail.com/
[4] https://marc.info/?l=linux-fsdevel&m=161738417018673&q=mbox

Available in the Git repository at:
===================================
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git ntfs-next

v2:
- Add ntfs3-compatible mount options(sys_immutable, nohidden, hide_dot_files, nocase, acl, windows_names, disable_sparse, discard).
- Add iocharset mount option.
- Add ntfs3-compatible dos attribute and ntfs attribute load/store in setxattr/getattr().
- Add support for FS_IOC_{GET,SET}FSLABEL ioctl.
- Add support for FITRIM ioctl.
- Fix the warnings(duplicate symbol, __divdi3, etc) from kernel test robot.
- Prefix pr_xxx() with ntfsplus.
- Add support for $MFT File extension.
- Add Documentation/filesystems/ntfsplus.rst.
- Mark experimental.
- Remove BUG traps warnings from checkpatch.pl.

Namjae Jeon (11):
ntfsplus: in-memory, on-disk structures and headers
ntfsplus: add super block operations
ntfsplus: add inode operations
ntfsplus: add directory operations
ntfsplus: add file operations
ntfsplus: add iomap and address space operations
ntfsplus: add attrib operatrions
ntfsplus: add runlist handling and cluster allocator
ntfsplus: add reparse and ea operations
ntfsplus: add misc operations
ntfsplus: add Kconfig and Makefile

 Documentation/filesystems/index.rst    |    1 +
 Documentation/filesystems/ntfsplus.rst |  199 +
 fs/Kconfig                             |    1 +
 fs/Makefile                            |    1 +
 fs/ntfsplus/Kconfig                    |   45 +
 fs/ntfsplus/Makefile                   |   18 +
 fs/ntfsplus/aops.c                     |  617 +++
 fs/ntfsplus/aops.h                     |   92 +
 fs/ntfsplus/attrib.c                   | 5377 ++++++++++++++++++++++++
 fs/ntfsplus/attrib.h                   |  159 +
 fs/ntfsplus/attrlist.c                 |  285 ++
 fs/ntfsplus/attrlist.h                 |   21 +
 fs/ntfsplus/bitmap.c                   |  290 ++
 fs/ntfsplus/bitmap.h                   |   93 +
 fs/ntfsplus/collate.c                  |  178 +
 fs/ntfsplus/collate.h                  |   37 +
 fs/ntfsplus/compress.c                 | 1564 +++++++
 fs/ntfsplus/dir.c                      | 1230 ++++++
 fs/ntfsplus/dir.h                      |   33 +
 fs/ntfsplus/ea.c                       |  931 ++++
 fs/ntfsplus/ea.h                       |   25 +
 fs/ntfsplus/file.c                     | 1142 +++++
 fs/ntfsplus/index.c                    | 2112 ++++++++++
 fs/ntfsplus/index.h                    |  127 +
 fs/ntfsplus/inode.c                    | 3729 ++++++++++++++++
 fs/ntfsplus/inode.h                    |  353 ++
 fs/ntfsplus/layout.h                   | 2288 ++++++++++
 fs/ntfsplus/lcnalloc.c                 | 1012 +++++
 fs/ntfsplus/lcnalloc.h                 |  127 +
 fs/ntfsplus/logfile.c                  |  770 ++++
 fs/ntfsplus/logfile.h                  |  316 ++
 fs/ntfsplus/mft.c                      | 2698 ++++++++++++
 fs/ntfsplus/mft.h                      |   92 +
 fs/ntfsplus/misc.c                     |  213 +
 fs/ntfsplus/misc.h                     |  218 +
 fs/ntfsplus/mst.c                      |  195 +
 fs/ntfsplus/namei.c                    | 1677 ++++++++
 fs/ntfsplus/ntfs.h                     |  180 +
 fs/ntfsplus/ntfs_iomap.c               |  700 +++
 fs/ntfsplus/ntfs_iomap.h               |   22 +
 fs/ntfsplus/reparse.c                  |  550 +++
 fs/ntfsplus/reparse.h                  |   15 +
 fs/ntfsplus/runlist.c                  | 1983 +++++++++
 fs/ntfsplus/runlist.h                  |   91 +
 fs/ntfsplus/super.c                    | 2865 +++++++++++++
 fs/ntfsplus/unistr.c                   |  473 +++
 fs/ntfsplus/upcase.c                   |   73 +
 fs/ntfsplus/volume.h                   |  254 ++
 include/uapi/linux/ntfs.h              |   23 +
 49 files changed, 35495 insertions(+)
 create mode 100644 Documentation/filesystems/ntfsplus.rst
 create mode 100644 fs/ntfsplus/Kconfig
 create mode 100644 fs/ntfsplus/Makefile
 create mode 100644 fs/ntfsplus/aops.c
 create mode 100644 fs/ntfsplus/aops.h
 create mode 100644 fs/ntfsplus/attrib.c
 create mode 100644 fs/ntfsplus/attrib.h
 create mode 100644 fs/ntfsplus/attrlist.c
 create mode 100644 fs/ntfsplus/attrlist.h
 create mode 100644 fs/ntfsplus/bitmap.c
 create mode 100644 fs/ntfsplus/bitmap.h
 create mode 100644 fs/ntfsplus/collate.c
 create mode 100644 fs/ntfsplus/collate.h
 create mode 100644 fs/ntfsplus/compress.c
 create mode 100644 fs/ntfsplus/dir.c
 create mode 100644 fs/ntfsplus/dir.h
 create mode 100644 fs/ntfsplus/ea.c
 create mode 100644 fs/ntfsplus/ea.h
 create mode 100644 fs/ntfsplus/file.c
 create mode 100644 fs/ntfsplus/index.c
 create mode 100644 fs/ntfsplus/index.h
 create mode 100644 fs/ntfsplus/inode.c
 create mode 100644 fs/ntfsplus/inode.h
 create mode 100644 fs/ntfsplus/layout.h
 create mode 100644 fs/ntfsplus/lcnalloc.c
 create mode 100644 fs/ntfsplus/lcnalloc.h
 create mode 100644 fs/ntfsplus/logfile.c
 create mode 100644 fs/ntfsplus/logfile.h
 create mode 100644 fs/ntfsplus/mft.c
 create mode 100644 fs/ntfsplus/mft.h
 create mode 100644 fs/ntfsplus/misc.c
 create mode 100644 fs/ntfsplus/misc.h
 create mode 100644 fs/ntfsplus/mst.c
 create mode 100644 fs/ntfsplus/namei.c
 create mode 100644 fs/ntfsplus/ntfs.h
 create mode 100644 fs/ntfsplus/ntfs_iomap.c
 create mode 100644 fs/ntfsplus/ntfs_iomap.h
 create mode 100644 fs/ntfsplus/reparse.c
 create mode 100644 fs/ntfsplus/reparse.h
 create mode 100644 fs/ntfsplus/runlist.c
 create mode 100644 fs/ntfsplus/runlist.h
 create mode 100644 fs/ntfsplus/super.c
 create mode 100644 fs/ntfsplus/unistr.c
 create mode 100644 fs/ntfsplus/upcase.c
 create mode 100644 fs/ntfsplus/volume.h
 create mode 100644 include/uapi/linux/ntfs.h

--
2.25.1

#39 lore raw
Quoted 24 lines · Amir Goldstein
Quoted 22 lines · Namjae Jeon
Quoted 6 lines · Amir Goldstein
Quoted 4 lines · Namjae Jeon

Introduction
============

Quoted 9 lines
Quoted 8 lines

The NTFS filesystem[1] still remains the default filesystem for Windows and The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices, making it easier for Linux users to work with NTFS-formatted drives. Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3. ntfs3 still has many problems and is poorly maintained, so users and distributions are still using the old legacy ntfs-3g.

Hi Amir,

Quoted 4 lines

May I suggest that you add a patch to your series to add a deprecation message to ntfs3?

See for example eb103a51640ee ("reiserfs: Deprecate reiserfs")

Quoted 8 lines
Quoted 2 lines

Okay, I'll add it in the next version, referring to this reiserfs patch.

Quoted 1 line

There is no need to refer to this patch, there is nothing special about it. It's just an example for you of past deprecation procedures.

Unlike resierfs, the deprecation warning and help text for ntfs3 should refer users to the better in-tree alternative.

Okay, I will do that.
Thanks!

Quoted 301 lines

Thanks,
Amir.

Quoted 297 lines
Quoted 15 lines
Quoted 5 lines

What is ntfsplus?
=================

Quoted 9 lines

The remade ntfs called ntfsplus is an implementation that supports write and the essential requirements(iomap, no buffer-head, utilities, xfstests test result) based on read-only classic NTFS.
The old read-only ntfs code is much cleaner, with extensive comments, offers readability that makes understanding NTFS easier. This is why ntfsplus was developed on old read-only NTFS base.
The target is to provide current trends(iomap, no buffer head, folio), enhanced performance, stable maintenance, utility support including fsck.

Quoted 3 lines

You are bringing back the old ntfs driver code from the dead, preserving the code and Copyrights and everything to bring it up to speed with modern vfs API and to add super nice features. Right?

Yes.

Quoted 3 lines

Apart from its history, the new refurbished ntfs driver is also fully backward compact to the old read-only driver. Right?

Yes.

Quoted 6 lines

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Right, I wanted to rebrand ntfsprogs-plus and ntfsplus into a paired set of names. Also, ntfs3 was already used as an alias for ntfs, so I couldn't touch ntfs3 driver without consensus from the fs maintainers.

Quoted 2 lines

Do you have any objections to leaving its original ntfs name?

I have no objection to using ntfsplus as an alias for ntfs if we add a deprecation message to ntfs3.

Quoted 4 lines

You can also do:
MODULE_ALIAS_FS("ntfs");
MODULE_ALIAS_FS("ntfsplus");

I will add this in the next version with ntfs3 deprecation patch.

Quoted 2 lines

If that is useful for ntfsprogs-plus somehow.

That is very useful and thanks for your review!

Quoted 253 lines

Thanks,
Amir.

Quoted 249 lines

Key Features
============

- Write support:
Implement write support on classic read-only NTFS. Additionally, integrate delayed allocation to enhance write performance through multi-cluster allocation and minimized fragmentation of cluster bitmap.

- Switch to using iomap:
Use iomap for buffered IO writes, reads, direct IO, file extent mapping, readpages, writepages operations.

- Stop using the buffer head:
The use of buffer head in old ntfs and switched to use folio instead. As a result, CONFIG_BUFFER_HEAD option enable is removed in Kconfig also.

- Public utilities include fsck[2]:
While ntfs-3g includes ntfsprogs as a component, it notably lacks the fsck implementation. So we have launched a new ntfs utilitiies project called ntfsprogs-plus by forking from ntfs-3g after removing unnecessary ntfs fuse implementation. fsck.ntfs can be used for ntfs testing with xfstests as well as for recovering corrupted NTFS device.

- Performance Enhancements:

- ntfsplus vs. ntfs3:

* Performance was benchmarked using iozone with various chunk size.
- In single-thread(1T) write tests, ntfsplus show approximately 3~5% better performance.
- In multi-thread(4T) write tests, ntfsplus show approximately 35~110% better performance.
- Read throughput is identical for both ntfs implementations.

1GB file size:4096 size:16384 size:65536
MB/sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
read 399 | 399 426 | 424 429 | 430
─────────────────────────────────────────────────────────────────
write(1T) 291 | 276 325 | 305 333 | 317
write(4T) 105 | 50 113 | 78 114 | 99.6

* File list browsing performance. (about 12~14% faster)

files:100000 files:200000 files:400000
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
ls -lR 7.07 | 8.10 14.03 | 16.35 28.27 | 32.86

* mount time.

parti_size:1TB parti_size:2TB parti_size:4TB
Sec ntfsplus | ntfs3 ntfsplus | ntfs3 ntfsplus | ntfs3
─────────────────────────────────────────────────────────────────
mount 0.38 | 2.03 0.39 | 2.25 0.70 | 4.51

The following are the reasons why ntfsplus performance is higher
compared to ntfs3:
- Use iomap aops.
- Delayed allocation support.
- Optimize zero out for newly allocated clusters.
- Optimize runlist merge overhead with small chunck size.
- pre-load mft(inode) blocks and index(dentry) blocks to improve readdir + stat performance.
- Load lcn bitmap on background.

- Stability improvement:
a. Pass more xfstests tests:
ntfsplus passed 287 tests, significantly higher than ntfs3's 218. ntfsplus implement fallocate, idmapped mount and permission, etc, resulting in a significantly high number of xfstests passing compared to ntfs3.
b. Bonnie++ issue[3]:
The Bonnie++ benchmark fails on ntfs3 with a "Directory not empty" error during file deletion. ntfs3 currently iterates directory entries by reading index blocks one by one. When entries are deleted concurrently, index block merging or entry relocation can cause readdir() to skip some entries, leaving files undeleted in workloads(bonnie++) that mix unlink and directory scans. ntfsplus implement leaf chain traversal in readdir to avoid entry skip on deletion.

- Journaling support:
ntfs3 does not provide full journaling support. It only implement journal replay[4], which in our testing did not function correctly. My next task after upstreaming will be to add full journal support to ntfsplus.

The feature comparison summary
==============================

Feature                               ntfsplus   ntfs3
===================================   ========   ===========
Write support                         Yes        Yes
iomap support                         Yes        No
No buffer head                        Yes        No
Public utilities(mkfs, fsck, etc.)    Yes        No
xfstests passed                       287        218
Idmapped mount                        Yes        No
Delayed allocation                    Yes        No
Bonnie++                              Pass       Fail
Journaling                            Planned    Inoperative
===================================   ========   ===========

References
==========
[1] https://en.wikipedia.org/wiki/NTFS
[2] https://github.com/ntfsprogs-plus/ntfsprogs-plus
[3] https://lore.kernel.org/ntfs3/CAOZgwEd7NDkGEpdF6UQTcbYuupDavaHBoj4WwTy3Qe4Bqm6V0g@mail.gmail.com/
[4] https://marc.info/?l=linux-fsdevel&m=161738417018673&q=mbox

Available in the Git repository at:
===================================
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git ntfs-next

v2:
- Add ntfs3-compatible mount options(sys_immutable, nohidden, hide_dot_files, nocase, acl, windows_names, disable_sparse, discard).
- Add iocharset mount option.
- Add ntfs3-compatible dos attribute and ntfs attribute load/store in setxattr/getattr().
- Add support for FS_IOC_{GET,SET}FSLABEL ioctl.
- Add support for FITRIM ioctl.
- Fix the warnings(duplicate symbol, __divdi3, etc) from kernel test robot.
- Prefix pr_xxx() with ntfsplus.
- Add support for $MFT File extension.
- Add Documentation/filesystems/ntfsplus.rst.
- Mark experimental.
- Remove BUG traps warnings from checkpatch.pl.

Namjae Jeon (11):
ntfsplus: in-memory, on-disk structures and headers
ntfsplus: add super block operations
ntfsplus: add inode operations
ntfsplus: add directory operations
ntfsplus: add file operations
ntfsplus: add iomap and address space operations
ntfsplus: add attrib operatrions
ntfsplus: add runlist handling and cluster allocator
ntfsplus: add reparse and ea operations
ntfsplus: add misc operations
ntfsplus: add Kconfig and Makefile

 Documentation/filesystems/index.rst    |    1 +
 Documentation/filesystems/ntfsplus.rst |  199 +
 fs/Kconfig                             |    1 +
 fs/Makefile                            |    1 +
 fs/ntfsplus/Kconfig                    |   45 +
 fs/ntfsplus/Makefile                   |   18 +
 fs/ntfsplus/aops.c                     |  617 +++
 fs/ntfsplus/aops.h                     |   92 +
 fs/ntfsplus/attrib.c                   | 5377 ++++++++++++++++++++++++
 fs/ntfsplus/attrib.h                   |  159 +
 fs/ntfsplus/attrlist.c                 |  285 ++
 fs/ntfsplus/attrlist.h                 |   21 +
 fs/ntfsplus/bitmap.c                   |  290 ++
 fs/ntfsplus/bitmap.h                   |   93 +
 fs/ntfsplus/collate.c                  |  178 +
 fs/ntfsplus/collate.h                  |   37 +
 fs/ntfsplus/compress.c                 | 1564 +++++++
 fs/ntfsplus/dir.c                      | 1230 ++++++
 fs/ntfsplus/dir.h                      |   33 +
 fs/ntfsplus/ea.c                       |  931 ++++
 fs/ntfsplus/ea.h                       |   25 +
 fs/ntfsplus/file.c                     | 1142 +++++
 fs/ntfsplus/index.c                    | 2112 ++++++++++
 fs/ntfsplus/index.h                    |  127 +
 fs/ntfsplus/inode.c                    | 3729 ++++++++++++++++
 fs/ntfsplus/inode.h                    |  353 ++
 fs/ntfsplus/layout.h                   | 2288 ++++++++++
 fs/ntfsplus/lcnalloc.c                 | 1012 +++++
 fs/ntfsplus/lcnalloc.h                 |  127 +
 fs/ntfsplus/logfile.c                  |  770 ++++
 fs/ntfsplus/logfile.h                  |  316 ++
 fs/ntfsplus/mft.c                      | 2698 ++++++++++++
 fs/ntfsplus/mft.h                      |   92 +
 fs/ntfsplus/misc.c                     |  213 +
 fs/ntfsplus/misc.h                     |  218 +
 fs/ntfsplus/mst.c                      |  195 +
 fs/ntfsplus/namei.c                    | 1677 ++++++++
 fs/ntfsplus/ntfs.h                     |  180 +
 fs/ntfsplus/ntfs_iomap.c               |  700 +++
 fs/ntfsplus/ntfs_iomap.h               |   22 +
 fs/ntfsplus/reparse.c                  |  550 +++
 fs/ntfsplus/reparse.h                  |   15 +
 fs/ntfsplus/runlist.c                  | 1983 +++++++++
 fs/ntfsplus/runlist.h                  |   91 +
 fs/ntfsplus/super.c                    | 2865 +++++++++++++
 fs/ntfsplus/unistr.c                   |  473 +++
 fs/ntfsplus/upcase.c                   |   73 +
 fs/ntfsplus/volume.h                   |  254 ++
 include/uapi/linux/ntfs.h              |   23 +
 49 files changed, 35495 insertions(+)
 create mode 100644 Documentation/filesystems/ntfsplus.rst
 create mode 100644 fs/ntfsplus/Kconfig
 create mode 100644 fs/ntfsplus/Makefile
 create mode 100644 fs/ntfsplus/aops.c
 create mode 100644 fs/ntfsplus/aops.h
 create mode 100644 fs/ntfsplus/attrib.c
 create mode 100644 fs/ntfsplus/attrib.h
 create mode 100644 fs/ntfsplus/attrlist.c
 create mode 100644 fs/ntfsplus/attrlist.h
 create mode 100644 fs/ntfsplus/bitmap.c
 create mode 100644 fs/ntfsplus/bitmap.h
 create mode 100644 fs/ntfsplus/collate.c
 create mode 100644 fs/ntfsplus/collate.h
 create mode 100644 fs/ntfsplus/compress.c
 create mode 100644 fs/ntfsplus/dir.c
 create mode 100644 fs/ntfsplus/dir.h
 create mode 100644 fs/ntfsplus/ea.c
 create mode 100644 fs/ntfsplus/ea.h
 create mode 100644 fs/ntfsplus/file.c
 create mode 100644 fs/ntfsplus/index.c
 create mode 100644 fs/ntfsplus/index.h
 create mode 100644 fs/ntfsplus/inode.c
 create mode 100644 fs/ntfsplus/inode.h
 create mode 100644 fs/ntfsplus/layout.h
 create mode 100644 fs/ntfsplus/lcnalloc.c
 create mode 100644 fs/ntfsplus/lcnalloc.h
 create mode 100644 fs/ntfsplus/logfile.c
 create mode 100644 fs/ntfsplus/logfile.h
 create mode 100644 fs/ntfsplus/mft.c
 create mode 100644 fs/ntfsplus/mft.h
 create mode 100644 fs/ntfsplus/misc.c
 create mode 100644 fs/ntfsplus/misc.h
 create mode 100644 fs/ntfsplus/mst.c
 create mode 100644 fs/ntfsplus/namei.c
 create mode 100644 fs/ntfsplus/ntfs.h
 create mode 100644 fs/ntfsplus/ntfs_iomap.c
 create mode 100644 fs/ntfsplus/ntfs_iomap.h
 create mode 100644 fs/ntfsplus/reparse.c
 create mode 100644 fs/ntfsplus/reparse.h
 create mode 100644 fs/ntfsplus/runlist.c
 create mode 100644 fs/ntfsplus/runlist.h
 create mode 100644 fs/ntfsplus/super.c
 create mode 100644 fs/ntfsplus/unistr.c
 create mode 100644 fs/ntfsplus/upcase.c
 create mode 100644 fs/ntfsplus/volume.h
 create mode 100644 include/uapi/linux/ntfs.h

--
2.25.1

#40 lore raw
In reply to Namjae Jeon
Quoted 8 lines · Namjae Jeon
Quoted 5 lines

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Right, I wanted to rebrand ntfsprogs-plus and ntfsplus into a paired set of names. Also, ntfs3 was already used as an alias for ntfs, so I couldn't touch ntfs3 driver without consensus from the fs maintainers.

I think you're adding more confusion than you're removing with the name change. Please, just call it ntfs. We have hfs and hfsplus already, and those refer to different filesystems. We should just call this ntfs.

#41 lore raw
Quoted 7 lines · Matthew Wilcox
Quoted 5 lines · Namjae Jeon
Quoted 5 lines

Why is the rebranding to ntfsplus useful then?

I can understand that you want a new name for a new ntfsprogs-plus project which is a fork of ntfs-3g, but I don't think that the new name for the kernel driver is useful or welcome.

Quoted 7 lines
Quoted 3 lines

Right, I wanted to rebrand ntfsprogs-plus and ntfsplus into a paired set of names. Also, ntfs3 was already used as an alias for ntfs, so I couldn't touch ntfs3 driver without consensus from the fs maintainers.

I think you're adding more confusion than you're removing with the name change. Please, just call it ntfs. We have hfs and hfsplus already, and those refer to different filesystems. We should just call this ntfs.

Okay, I will change it back to the name "ntfs" in the next version. Thanks!

#42 lore raw
In reply to Namjae Jeon

On Thu, 27 Nov 2025 13:59:33 +0900
Namjae Jeon <[email protected]> wrote:

Hello Namjae,

Thank you for posting this patchset. We are very interested in the development of ntfsplus.

In our production environment, we have been relying on the out-of-tree ntfs-3g driver for NTFS read-write support. However, it comes with several limitations regarding performance and integration. While we have been closely monitoring the in-kernel ntfs3 driver, we feel that features like full journaling support and a robust fsck utility are critical for our use cases, and we have been waiting for these to mature.

Given your proven track record with the exfat driver upstreaming and maintenance, we are confident in the quality and future of this ntfsplus initiative. We are hopeful that it will address the long-standing gaps we've observed.

We are eagerly following the progress of ntfsplus. Once it reaches a stable and feature-complete state—especially with reliable journaling and fsck—we would seriously consider deploying it to replace ntfs-3g in our production systems.

Quoted 13 lines

Introduction
============

The NTFS filesystem[1] still remains the default filesystem for Windows and The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices, making it easier for Linux users to work with NTFS-formatted drives. Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3. ntfs3 still has many problems and is poorly maintained, so users and distributions are still using the old legacy ntfs-3g.

Signature · 2 lines
Thanks,
Winston
#43 lore raw
Quoted 2 lines · Winston Wen

On Thu, 27 Nov 2025 13:59:33 +0900
Namjae Jeon <[email protected]> wrote:

...

Quoted 5 lines

Given your proven track record with the exfat driver upstreaming and maintenance, we are confident in the quality and future of this ntfsplus initiative. We are hopeful that it will address the long-standing gaps we've observed.

Just for the record here, I heard about this from Namjae almost a year ago about this. Personally, I support this NTFS work simply because Namjae has a good visible reputation in the community as well as he is a real kernel filesystem developer active for more than a decade. I can imagine it will be more likely to be a success (and healthy driven by the community development) compared to previous attempts.

Currently I am lacking time for this, but I could help if needed.

Thanks,
Gao Xiang

#44 lore raw
In reply to Winston Wen
Quoted 5 lines · Winston Wen

On Thu, 27 Nov 2025 13:59:33 +0900
Namjae Jeon <[email protected]> wrote:

Hello Namjae,

Hello Winston,

Quoted 17 lines

Thank you for posting this patchset. We are very interested in the development of ntfsplus.

In our production environment, we have been relying on the out-of-tree ntfs-3g driver for NTFS read-write support. However, it comes with several limitations regarding performance and integration. While we have been closely monitoring the in-kernel ntfs3 driver, we feel that features like full journaling support and a robust fsck utility are critical for our use cases, and we have been waiting for these to mature.

Given your proven track record with the exfat driver upstreaming and maintenance, we are confident in the quality and future of this ntfsplus initiative. We are hopeful that it will address the long-standing gaps we've observed.

Quoted 4 lines

We are eagerly following the progress of ntfsplus. Once it reaches a stable and feature-complete state—especially with reliable journaling and fsck—we would seriously consider deploying it to replace ntfs-3g in our production systems.

fsck.ntfs is supported through ntfsprogs-plus, and we plan to continue updating it. I believe that fsck.ntfs will partially cover the issues caused by the lack of journaling. I don't know your usecase but I don't have any major difficulties supporting NTFS on our products using ntfsplus yet, even without journaling. And I plan to begin implementing journaling support for ntfsplus early next year, and welcome any feedback or collaboration from you. I'll make sure to CC you when sending the journaling patches to the list.

#45 lore raw

On Fri, 28 Nov 2025 16:02:29 +0900
Namjae Jeon <[email protected]> wrote:

Hi Namjae,

Thank you for the detailed and encouraging reply.

Quoted 3 lines

fsck.ntfs is supported through ntfsprogs-plus, and we plan to continue updating it. I believe that fsck.ntfs will partially cover the issues caused by the lack of journaling. I don't know your usecase but I

That's good to know. I will definitely look into and test fsck.ntfs from ntfsprogs-plus.

Quoted 6 lines

don't have any major difficulties supporting NTFS on our products using ntfsplus yet, even without journaling. And I plan to begin implementing journaling support for ntfsplus early next year, and welcome any feedback or collaboration from you. I'll make sure to CC you when sending the journaling patches to the list.

Regarding our use case, our primary scenario involves USB flash drives and external HDDs/SSDs for data exchange between Linux and Windows systems. In fact, we are already users and beneficiaries of your work on the exFAT driver in many of these scenarios. Therefore, our main concerns are:

- File copy performance for typical user operations.
- Filesystem consistency in the face of unexpected actions, such as users unplugging the drive without safe ejection. This is where we believe journaling support would be crucial.

We are currently preparing to test the ntfsplus driver ourselves. Once it's merged into the mainline kernel, it's highly likely that we will provide support for it in Deepin as one of the early adopters.

Please feel free to let us know if there's any way we can help, be it testing specific features, providing feedback on real-world usage patterns, or otherwise. We would be happy to participate.

Thanks again for your work on this and for keeping us in the loop.

Signature · 2 lines
Thanks,
Winston