Btrfs: don't flush delalloc arbitrarily
authorJosef Bacik <josef@redhat.com>
Fri, 15 Jul 2011 16:01:03 +0000 (16:01 +0000)
committerChris Mason <chris.mason@oracle.com>
Wed, 27 Jul 2011 16:46:43 +0000 (12:46 -0400)
Kill the check to see if we have 512mb of reserved space in delalloc and
shrink_delalloc if we do.  This causes unexpected latencies and we have other
logic to see if we need to throttle.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c

index 5ab31f70ff5b08dd568db35681c7e796c4f6e266..0a5bd67e2894185fe248038f4c3fc241df20b94a 100644 (file)
@@ -3986,9 +3986,6 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
 
        block_rsv_add_bytes(block_rsv, to_reserve, 1);
 
-       if (block_rsv->size > 512 * 1024 * 1024)
-               shrink_delalloc(NULL, root, to_reserve, 0);
-
        return 0;
 }