[PATCH v1 0/4] ntfs: fix MFT bitmap extension allocation

Xuewen Wang posted 4 patches 11 hours ago
Only 1 patches received!
There is a newer version of this series
fs/ntfs/mft.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
[PATCH v1 0/4] ntfs: fix MFT bitmap extension allocation
Posted by Xuewen Wang 11 hours ago
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
Re: [PATCH v1 0/4] ntfs: fix MFT bitmap extension allocation
Posted by Namjae Jeon 3 hours ago
On Thu, Sep 24, 2026 at 10:42 AM Xuewen Wang <wangxuewen@kylinos.cn> wrote:
>
> 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
Could you provide more details on how these patches were tested ?
Thanks!