• Z
    btrfs: Support busy loop of write and delete · c99f1b0c
    Zhao Lei 提交于
    Reproduce:
     while true; do
       dd if=/dev/zero of=/mnt/btrfs/file count=[75% fs_size]
       rm /mnt/btrfs/file
     done
     Then we can see above loop failed on NO_SPACE.
    
    It it long-term problem since very beginning, because delayed-iput
    after rm are not run.
    
    We already have commit_transaction() in alloc_space code, but it is
    not triggered in above case.
    This patch trigger commit_transaction() to run delayed-iput and
    reflash pinned-space to to make write success.
    
    It is based on previous fix of delayed-iput in commit_transaction(),
    need to be applied on top of:
    btrfs: Fix NO_SPACE bug caused by delayed-iput
    Signed-off-by: NZhao Lei <zhaolei@cn.fujitsu.com>
    Signed-off-by: NChris Mason <clm@fb.com>
    c99f1b0c
extent-tree.c 270.6 KB