Skip to content

Commit

Permalink
Btrfs: do not start delalloc inodes during sync
Browse files Browse the repository at this point in the history
btrfs_start_delalloc_inodes will just walk the list of delalloc inodes and
start writing them out, but it doesn't splice the list or anything so as
long as somebody is doing work on the box you could end up in this section
_forever_.  So just remove it, it's not needed anyway since sync will start
writeback on all inodes anyway, all we need to do is wait for ordered
extents and then we can commit the transaction.  In my horrible torture test
sync goes from taking 4 minutes to about 1.5 minutes.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Apr 27, 2012
1 parent 25cd999 commit 996d282
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
return 0;
}

btrfs_start_delalloc_inodes(root, 0);
btrfs_wait_ordered_extents(root, 0, 0);

trans = btrfs_start_transaction(root, 0);
Expand Down

0 comments on commit 996d282

Please sign in to comment.