[PATCH 0/3] ntfs: fix spurious EIO and ENOSPC on nearly full volumes

From: Matthias Goergens

Date: Sun Sep 27 2026 - 06:58:17 EST


These fix three errors returned while free space is left. Patch 1
fixes file creation failing with EIO on a nearly full volume; it now
goes on until the volume is full and then fails with ENOSPC. Patch 2
fixes the cluster allocator missing free clusters when its start hint
lies at or past the end of the volume, which empties the MFT zone, and
patch 3 removes the fallocate() check that then fails every later call.
Together the two bugs make fallocate() refuse space that is free until
the next mount. Reproducers, run with KASAN and lockdep:
https://github.com/matthiasgoergens/linux/tree/reproducer/2026-09-27-ntfs-nearfull

Matthias Goergens (3):
ntfs: set the attribute list size before reserving space for it
ntfs: restart the zone search when the allocation hint fails
ntfs: do not refuse fallocate() when the MFT zone is empty

fs/ntfs/attrlist.c | 5 +++--
fs/ntfs/file.c | 3 ---
fs/ntfs/lcnalloc.c | 18 +++++++++++++++---
3 files changed, 18 insertions(+), 8 deletions(-)

base-commit: 259abb551e2944998cad4214c201954ab1ac5c8d

--
2.55.0