* [GIT PULL] ntfs updates for 7.1-rc1(v2)
@ 2026-04-17 5:13 Namjae Jeon
2026-04-18 0:01 ` Linus Torvalds
2026-04-18 0:11 ` pr-tracker-bot
0 siblings, 2 replies; 4+ messages in thread
From: Namjae Jeon @ 2026-04-17 5:13 UTC (permalink / raw)
To: Linus Torvalds
Cc: Linux Kernel Mailing List, Christoph Hellwig, Hyeoncheol Lee
Hi Linus,
In this v2, I have dropped the two build-fix patches that were causing
issues in the previous PR. here is the patches that cause semantic
conflicts with this series in linux-next:
0c2aa6635716 ("mm: reintroduce vma_desc_test() as a singular flag test")
96fefcabf340 ("vfs: widen inode hash/lookup functions to u64")
Mark Brown has already addressed these conflicts in linux-next.
Ever since Kari Argillander’s 2022 report regarding the "orphan" state
of the ntfs3 driver, I have spent the last 4 years working to provide
full write support and current trends(iomap, no buffer head, folio),
enhanced performance, stable maintenance, utility support including
fsck for NTFS in Linux. This new implementation is built upon the
clean foundation of the original read-only NTFS driver, adding:
- Full write support with delayed allocation.
- iomap and folio integration (removing buffer_head dependency).
- Better stability (passing 326 xfstests vs 273 for ntfs3).
- Come with a new suite of userspace utilities (ntfsprogs-plus).
The series has been reviewed and carries an Acked-by from Christoph Hellwig.
This series has been in linux-next for approximately two months. During
that time, additional fixes from Smatch static analysis and the patches
from other developers have been incorporated.
The following changes since commit 2b7a25df823dc7d8f56f8ce7c2d2dac391cea9c2:
Merge tag 'mm-nonmm-stable-2026-02-18-19-56' of
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm (2026-02-18
21:40:16 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git
tags/ntfs-for-7.1-rc1-v2
for you to fetch changes up to 14f0a13ec79dfa63e143ea45e6530d80bec6e291:
ntfs: remove redundant out-of-bound checks (2026-04-07 18:36:13 +0900)
----------------------------------------------------------------
Major changes:
- Write support:
Implemented full write support based on the classic read-only NTFS
driver. Added delayed allocation to improve write performance through
multi-cluster allocation and reduced fragmentation of the cluster
bitmap.
- iomap conversion:
Switched buffered IO (reads/writes), direct IO, file extent mapping,
readpages, and writepages to use iomap.
- Remove buffer_head:
Completely removed buffer_head usage by converting to folios.
As a result, the dependency on CONFIG_BUFFER_HEAD has been removed
from Kconfig.
- Stability improvements:
The new ntfs driver passes 326 xfstests, compared to 273 for ntfs3.
All tests passed by ntfs3 are a complete subset of the tests passed
by this implementation. Added support for fallocate, idmapped mounts,
permissions, and more.
- xfstests Results report:
Total tests run: 787
Passed : 326
Failed : 38
Skipped : 423
Failed tests breakdown:
- 34 tests require metadata journaling
- 4 other tests:
094: No unwritten extent concept in NTFS on-disk format
563: cgroup v2 aware writeback accounting not supported
631: RENAME_WHITEOUT support required
787: NFS delegation test
----------------------------------------------------------------
Arnd Bergmann (1):
ntfs: reduce stack usage in ntfs_write_mft_block()
Chen Ni (1):
ntfs: Remove unneeded semicolon
Colin Ian King (1):
ntfs: Fix spelling mistake "initiailized" -> "initialized"
Ethan Tidmore (6):
ntfs: Fix null pointer dereference
ntfs: Replace ERR_PTR(0) with NULL
ntfs: Remove impossible condition
ntfs: Place check before dereference
ntfs: Add missing error code
ntfs: Fix possible deadlock
Hyunchul Lee (13):
ntfs: fix pointer/integer casting warnings
ntfs: fix WSL ea restore condition
ntfs: validate WSL EA payload sizes
ntfs: check $EA query-length in ntfs_ea_get
ntfs: harden ntfs_ea_lookup against malformed EA entries
ntfs: harden ntfs_listxattr against EA entries
ntfs: prefer IS_ERR_OR_NULL() over manual NULL check
ntfs: fix variable dereferenced before check warnings
ntfs: fix inconsistent indenting warnings
ntfs: fix ignoring unreachable code warnings
ntfs: add bound checking to ntfs_attr_find
ntfs: add bound checking to ntfs_external_attr_find
ntfs: remove redundant out-of-bound checks
Namjae Jeon (21):
Revert "fs: Remove NTFS classic"
fs: add generic FS_IOC_SHUTDOWN definitions
ntfs: update in-memory, on-disk structures and headers
ntfs: update super block operations
ntfs: update inode operations
ntfs: update mft operations
ntfs: update directory operations
ntfs: update file operations
ntfs: update iomap and address space operations
ntfs: update attrib operations
ntfs: update runlist handling and cluster allocator
ntfs: add reparse and ea operations
ntfs: update misc operations
ntfs3: remove legacy ntfs driver support
ntfs: add Kconfig and Makefile
Documentation: filesystems: update NTFS driver documentation
MAINTAINERS: update ntfs filesystem entry
ntfs: fix sysctl table registration and path
ntfs: select FS_IOMAP in Kconfig
ntfs: change mft_no type to u64
ntfs: use ->mft_no instead of ->i_ino in prints
Randy Dunlap (1):
ntfs: repair docum. malformed table
Woody Suwalski (2):
ntfs: add MODULE_ALIAS_FS
ntfs: add missing newlines to pr_err() messages
CREDITS | 9 +-
Documentation/filesystems/index.rst | 1 +
Documentation/filesystems/ntfs.rst | 159 +
MAINTAINERS | 9 +
fs/Kconfig | 1 +
fs/Makefile | 1 +
fs/ntfs/Kconfig | 48 +
fs/ntfs/Makefile | 10 +
fs/ntfs/aops.c | 263 ++
fs/ntfs/attrib.c | 5539 +++++++++++++++++++++++++++++++++++
fs/ntfs/attrib.h | 164 ++
fs/ntfs/attrlist.c | 289 ++
fs/ntfs/attrlist.h | 20 +
fs/ntfs/bdev-io.c | 117 +
fs/ntfs/bitmap.c | 287 ++
fs/ntfs/bitmap.h | 100 +
fs/ntfs/collate.c | 146 +
fs/ntfs/collate.h | 36 +
fs/ntfs/compress.c | 1577 ++++++++++
fs/ntfs/debug.c | 171 ++
fs/ntfs/debug.h | 63 +
fs/ntfs/dir.c | 1238 ++++++++
fs/ntfs/dir.h | 32 +
fs/ntfs/ea.c | 954 ++++++
fs/ntfs/ea.h | 30 +
fs/ntfs/file.c | 1161 ++++++++
fs/ntfs/index.c | 2117 +++++++++++++
fs/ntfs/index.h | 111 +
fs/ntfs/inode.c | 3787 ++++++++++++++++++++++++
fs/ntfs/inode.h | 358 +++
fs/ntfs/iomap.c | 870 ++++++
fs/ntfs/iomap.h | 23 +
fs/ntfs/layout.h | 2346 +++++++++++++++
fs/ntfs/lcnalloc.c | 1049 +++++++
fs/ntfs/lcnalloc.h | 134 +
fs/ntfs/logfile.c | 778 +++++
fs/ntfs/logfile.h | 245 ++
fs/ntfs/malloc.h | 77 +
fs/ntfs/mft.c | 2924 ++++++++++++++++++
fs/ntfs/mft.h | 91 +
fs/ntfs/mst.c | 194 ++
fs/ntfs/namei.c | 1684 +++++++++++
fs/ntfs/ntfs.h | 294 ++
fs/ntfs/object_id.c | 158 +
fs/ntfs/object_id.h | 14 +
fs/ntfs/quota.c | 95 +
fs/ntfs/quota.h | 15 +
fs/ntfs/reparse.c | 573 ++++
fs/ntfs/reparse.h | 20 +
fs/ntfs/runlist.c | 2066 +++++++++++++
fs/ntfs/runlist.h | 97 +
fs/ntfs/super.c | 2765 +++++++++++++++++
fs/ntfs/sysctl.c | 54 +
fs/ntfs/sysctl.h | 26 +
fs/ntfs/time.h | 87 +
fs/ntfs/unistr.c | 477 +++
fs/ntfs/upcase.c | 70 +
fs/ntfs/volume.h | 296 ++
fs/ntfs3/Kconfig | 10 +-
fs/ntfs3/dir.c | 10 -
fs/ntfs3/file.c | 11 -
fs/ntfs3/inode.c | 16 +-
fs/ntfs3/ntfs_fs.h | 11 -
fs/ntfs3/super.c | 59 +-
include/uapi/linux/fs.h | 12 +
65 files changed, 36331 insertions(+), 118 deletions(-)
create mode 100644 Documentation/filesystems/ntfs.rst
create mode 100644 fs/ntfs/Kconfig
create mode 100644 fs/ntfs/Makefile
create mode 100644 fs/ntfs/aops.c
create mode 100644 fs/ntfs/attrib.c
create mode 100644 fs/ntfs/attrib.h
create mode 100644 fs/ntfs/attrlist.c
create mode 100644 fs/ntfs/attrlist.h
create mode 100644 fs/ntfs/bdev-io.c
create mode 100644 fs/ntfs/bitmap.c
create mode 100644 fs/ntfs/bitmap.h
create mode 100644 fs/ntfs/collate.c
create mode 100644 fs/ntfs/collate.h
create mode 100644 fs/ntfs/compress.c
create mode 100644 fs/ntfs/debug.c
create mode 100644 fs/ntfs/debug.h
create mode 100644 fs/ntfs/dir.c
create mode 100644 fs/ntfs/dir.h
create mode 100644 fs/ntfs/ea.c
create mode 100644 fs/ntfs/ea.h
create mode 100644 fs/ntfs/file.c
create mode 100644 fs/ntfs/index.c
create mode 100644 fs/ntfs/index.h
create mode 100644 fs/ntfs/inode.c
create mode 100644 fs/ntfs/inode.h
create mode 100644 fs/ntfs/iomap.c
create mode 100644 fs/ntfs/iomap.h
create mode 100644 fs/ntfs/layout.h
create mode 100644 fs/ntfs/lcnalloc.c
create mode 100644 fs/ntfs/lcnalloc.h
create mode 100644 fs/ntfs/logfile.c
create mode 100644 fs/ntfs/logfile.h
create mode 100644 fs/ntfs/malloc.h
create mode 100644 fs/ntfs/mft.c
create mode 100644 fs/ntfs/mft.h
create mode 100644 fs/ntfs/mst.c
create mode 100644 fs/ntfs/namei.c
create mode 100644 fs/ntfs/ntfs.h
create mode 100644 fs/ntfs/object_id.c
create mode 100644 fs/ntfs/object_id.h
create mode 100644 fs/ntfs/quota.c
create mode 100644 fs/ntfs/quota.h
create mode 100644 fs/ntfs/reparse.c
create mode 100644 fs/ntfs/reparse.h
create mode 100644 fs/ntfs/runlist.c
create mode 100644 fs/ntfs/runlist.h
create mode 100644 fs/ntfs/super.c
create mode 100644 fs/ntfs/sysctl.c
create mode 100644 fs/ntfs/sysctl.h
create mode 100644 fs/ntfs/time.h
create mode 100644 fs/ntfs/unistr.c
create mode 100644 fs/ntfs/upcase.c
create mode 100644 fs/ntfs/volume.h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] ntfs updates for 7.1-rc1(v2)
2026-04-17 5:13 [GIT PULL] ntfs updates for 7.1-rc1(v2) Namjae Jeon
@ 2026-04-18 0:01 ` Linus Torvalds
2026-04-18 1:31 ` Namjae Jeon
2026-04-18 0:11 ` pr-tracker-bot
1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2026-04-18 0:01 UTC (permalink / raw)
To: Namjae Jeon; +Cc: Linux Kernel Mailing List, Christoph Hellwig, Hyeoncheol Lee
On Thu, 16 Apr 2026 at 22:13, Namjae Jeon <linkinjeon@kernel.org> wrote:
>
> In this v2, I have dropped the two build-fix patches that were causing
> issues in the previous PR. here is the patches that cause semantic
> conflicts with this series in linux-next:
Ok, I've pulled this, and it's going through some test runs.
However, when merging it, I think I've already found a bug.
The merge resolution in ntfs_file_mmap_prepare() was not complicated,
but I think the code is simply *buggy*.
Checking whether the VMA_WRITE_BIT is set seems nonsensical. Yes, a
shared writable mmap has that bit set - but so does a *private*
writable mmap, which is a lot more common and doesn't actually write
to the filesystem (it only reads, and then does a copy-on-write).
But on the other hand, checking for VMA_WRITE_BIT is wrong for
*another* reason: maybe the mapping isn't writable, but if it's a
shared mapping of a file that was opened with write permissions, it
can *become* writable with a simple mprotect().
In other words,. checking VMA_WRITE_BIT is just nonsensical. It is
meaningless. It has literally nothing to do with "will this mapping
write to this file", but that *seems* to be how you use it.
VMA_WRITE_BIT is about whether the resulting mapping is writable, but
it's about whether it's writable as a *user mapping*, not whether it's
writable as a *filesystem write*.
And the two are very different things.
A mapping will write to the filesystem only if it is both
(a) VM_SHARED (not VM_PRIVATE)
(b) when the file descriptor was opened for writing, which sets VM_MAYWRITE.
and so the VM_WRITE bit is almost entirely irrelevant (I say "almost",
because in theory I guess you could check for VM_WRITE instead of
VM_MAYWRITE, but then you'd *also* have to catch mprotect() changing
the actual writability - but no filesystem has ever taken that
approach afaik).
I'm not going to fix that as part of the merge, and I think I'll leave
the merge in place, but this needs looking at. Because that code
_looks_ nonsensical to me.
The proper test for an actual writable shared mapping - that some
filesystems seem to do - is either
if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE))
in the mmap function (like fuse does) or
if (vma_desc_test_all(desc, VMA_SHARED_BIT, VMA_MAYWRITE_BIT))
(in the mmap_prepare function like erofs and zonefs do).
But I don't know this code, and I'm not going to make that change
blindly. Maybe this code does something else than what I think it
does.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] ntfs updates for 7.1-rc1(v2)
2026-04-17 5:13 [GIT PULL] ntfs updates for 7.1-rc1(v2) Namjae Jeon
2026-04-18 0:01 ` Linus Torvalds
@ 2026-04-18 0:11 ` pr-tracker-bot
1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2026-04-18 0:11 UTC (permalink / raw)
To: Namjae Jeon
Cc: Linus Torvalds, Linux Kernel Mailing List, Christoph Hellwig,
Hyeoncheol Lee
The pull request you sent on Fri, 17 Apr 2026 14:13:09 +0900:
> git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git tags/ntfs-for-7.1-rc1-v2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/cdd4dc3aebeab43a72ce0bc2b5bab6f0a80b97a5
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL] ntfs updates for 7.1-rc1(v2)
2026-04-18 0:01 ` Linus Torvalds
@ 2026-04-18 1:31 ` Namjae Jeon
0 siblings, 0 replies; 4+ messages in thread
From: Namjae Jeon @ 2026-04-18 1:31 UTC (permalink / raw)
To: Linus Torvalds
Cc: Linux Kernel Mailing List, Christoph Hellwig, Hyeoncheol Lee
On Sat, Apr 18, 2026 at 9:01 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Thu, 16 Apr 2026 at 22:13, Namjae Jeon <linkinjeon@kernel.org> wrote:
> >
> > In this v2, I have dropped the two build-fix patches that were causing
> > issues in the previous PR. here is the patches that cause semantic
> > conflicts with this series in linux-next:
>
> Ok, I've pulled this, and it's going through some test runs.
>
> However, when merging it, I think I've already found a bug.
>
> The merge resolution in ntfs_file_mmap_prepare() was not complicated,
> but I think the code is simply *buggy*.
>
> Checking whether the VMA_WRITE_BIT is set seems nonsensical. Yes, a
> shared writable mmap has that bit set - but so does a *private*
> writable mmap, which is a lot more common and doesn't actually write
> to the filesystem (it only reads, and then does a copy-on-write).
>
> But on the other hand, checking for VMA_WRITE_BIT is wrong for
> *another* reason: maybe the mapping isn't writable, but if it's a
> shared mapping of a file that was opened with write permissions, it
> can *become* writable with a simple mprotect().
>
> In other words,. checking VMA_WRITE_BIT is just nonsensical. It is
> meaningless. It has literally nothing to do with "will this mapping
> write to this file", but that *seems* to be how you use it.
>
> VMA_WRITE_BIT is about whether the resulting mapping is writable, but
> it's about whether it's writable as a *user mapping*, not whether it's
> writable as a *filesystem write*.
>
> And the two are very different things.
>
> A mapping will write to the filesystem only if it is both
>
> (a) VM_SHARED (not VM_PRIVATE)
>
> (b) when the file descriptor was opened for writing, which sets VM_MAYWRITE.
>
> and so the VM_WRITE bit is almost entirely irrelevant (I say "almost",
> because in theory I guess you could check for VM_WRITE instead of
> VM_MAYWRITE, but then you'd *also* have to catch mprotect() changing
> the actual writability - but no filesystem has ever taken that
> approach afaik).
>
> I'm not going to fix that as part of the merge, and I think I'll leave
> the merge in place, but this needs looking at. Because that code
> _looks_ nonsensical to me.
>
> The proper test for an actual writable shared mapping - that some
> filesystems seem to do - is either
>
> if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE))
>
> in the mmap function (like fuse does) or
>
> if (vma_desc_test_all(desc, VMA_SHARED_BIT, VMA_MAYWRITE_BIT))
>
> (in the mmap_prepare function like erofs and zonefs do).
>
> But I don't know this code, and I'm not going to make that change
> blindly. Maybe this code does something else than what I think it
> does.
Thank you very much for catching that bug. I will check the logic you
mentioned regarding VMA flags and fix it in the next PR. And I truly
appreciate you merging the NTFS resurrection series!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-18 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-17 5:13 [GIT PULL] ntfs updates for 7.1-rc1(v2) Namjae Jeon
2026-04-18 0:01 ` Linus Torvalds
2026-04-18 1:31 ` Namjae Jeon
2026-04-18 0:11 ` pr-tracker-bot
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