+243
−90
+4
−4
+164
−142
File changed.
Preview size limit exceeded, changes collapsed.
+67
−5
+38
−15
Loading
This patch implements delayed allocation (delalloc) in ntfs3 driver. It introduces an in-memory delayed-runlist (run_da) and the helpers to track, reserve and later convert those delayed reservations into real clusters at writeback time. The change keeps on-disk formats untouched and focuses on pagecache integration, correctness and safe interaction with fallocate, truncate, and dio/iomap paths. Key points: - add run_da (delay-allocated run tree) and bookkeeping for delayed clusters. - mark ranges as delalloc (DELALLOC_LCN) instead of immediately allocating. Actual allocation performed later (writeback / attr_set_size_ex / explicit flush paths). - direct i/o / iomap paths updated to avoid dio collisions with delalloc: dio falls back or forces allocation of delayed blocks before proceeding. - punch/collapse/truncate/fallocate check and cancel delay-alloc reservations. Sparse/compressed files handled specially. - free-space checks updated (ntfs_check_free_space) to account for reserved delalloc clusters and MFT record budgeting. - delayed allocations are committed on last writer (file release) and on explicit allocation flush paths. Tested-by:<syzbot@syzkaller.appspotmail.com> Reported-by:
<syzbot+2bd8e813c7f767aa9bb1@syzkaller.appspotmail.com> Signed-off-by:
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
File changed.
Preview size limit exceeded, changes collapsed.