This series fixes four bugs in the MFT bitmap extension path:
- The adjacent-cluster candidate can be outside the volume. Check it
before accessing $Bitmap and fall back to the regular allocator.
- The allocator can return an adjacent cluster that merges with the
existing run. Preserve that run when rolling back a failed extension.
- Rollback can wait for the initial $Bitmap scan while holding a folio
the scanner needs. Wait for the scan before starting the allocation.
- Direct allocation changes $Bitmap without updating the cached free
counts. Update both counts and honor per-page accounting and space
reserved for delayed allocation.
Xuewen Wang (4):
ntfs: bound the adjacent cluster in MFT bitmap extension
ntfs: fix rollback after MFT bitmap run coalescing
ntfs: wait for the bitmap scan before MFT bitmap extension
ntfs: account for direct MFT bitmap cluster allocation
fs/ntfs/mft.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
--
2.25.1