mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ntfs: fix spurious EIO and ENOSPC on nearly full volumes
@ 2026-10-01 14:49 Matthias Goergens
  2026-10-01 14:49 ` [PATCH v2 1/3] ntfs: set the attribute list size before reserving space for it Matthias Goergens
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matthias Goergens @ 2026-10-01 14:49 UTC (permalink / raw)
  To: Namjae Jeon, Hyunchul Lee; +Cc: Baolin Liu, liubaolin, ntfs, linux-kernel

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-10-01-ntfs-nearfull-v2

Changes in v2: in patch 2, a contiguous request whose run from the hint
stops at the end of a bitmap buffer or of the zone now gets that run
back, instead of a second, non-adjacent run from the zone position, as
Baolin Liu suggested.  That second run also happens on ntfs-next
without this series, and fallocate() over a hole then leaves part of the
range reading the data of a deleted file; patch 2 now fixes that as
well.  Rebased on ntfs-next, with Baolin's Reviewed-by on patches 1
and 3.

v1: https://lore.kernel.org/all/cover.1790503811.git.matthias.goergens@gmail.com/

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 | 25 ++++++++++++++++++++++---
 3 files changed, 25 insertions(+), 8 deletions(-)


base-commit: 708f9d56cacae21aeee98d16bcdd50a66edc04a0
-- 
2.56.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-02  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01 14:49 [PATCH v2 0/3] ntfs: fix spurious EIO and ENOSPC on nearly full volumes Matthias Goergens
2026-10-01 14:49 ` [PATCH v2 1/3] ntfs: set the attribute list size before reserving space for it Matthias Goergens
2026-10-01 14:49 ` [PATCH v2 2/3] ntfs: restart the zone search when the allocation hint fails Matthias Goergens
2026-10-01 14:49 ` [PATCH v2 3/3] ntfs: do not refuse fallocate() when the MFT zone is empty Matthias Goergens
2026-10-02  5:37 ` [PATCH v2 0/3] ntfs: fix spurious EIO and ENOSPC on nearly full volumes Hyunchul Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®