Skip to content
  • Yan Zheng's avatar
    Btrfs: make sure all dirty blocks are written at commit time · 4a8c9a62
    Yan Zheng authored
    
    
    Write dirty block groups may allocate new block, and so may add new delayed
    back ref. btrfs_run_delayed_refs may make some block groups dirty.
    
    commit_cowonly_roots does not handle the recursion properly, and some dirty
    blocks can be left unwritten at commit time. This patch moves
    btrfs_run_delayed_refs into the loop that writes dirty block groups, and makes
    the code not break out of the loop until there are no dirty block groups or
    delayed back refs.
    
    Signed-off-by: default avatarYan Zheng <zheng.yan@oracle.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    4a8c9a62