aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-08-27 17:48:15 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:19:04 -0400
commitca7e70f59078046db28501519308c2061b0e7a6f (patch)
tree9685496d94625bc732e029f2a21f049506bf8618 /fs/btrfs/ctree.h
parent06d3d22b456c2f87aeb1eb4517eeabb47e21fcc9 (diff)
Btrfs: do not needlessly restart the transaction for enospc
We will stop and restart a transaction every time we move to a different leaf when truncating a file. This is for enospc reasons, but really we could probably get away with doing this a little better by actually working until we hit an ENOSPC. So add a ->failfast flag to the block_rsv and set it when we do truncates which will fail as soon as the block rsv runs out of space, and then at that point we can stop and restart the transaction and refill the block rsv and carry on. This will make rm'ing of a file with lots of extents a bit faster. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 4b81ea3fa1b..81c772b5dc8 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1034,6 +1034,7 @@ struct btrfs_block_rsv {
1034 struct btrfs_space_info *space_info; 1034 struct btrfs_space_info *space_info;
1035 spinlock_t lock; 1035 spinlock_t lock;
1036 unsigned int full; 1036 unsigned int full;
1037 unsigned int failfast;
1037}; 1038};
1038 1039
1039/* 1040/*