diff options
author | Josef Bacik <josef@redhat.com> | 2011-10-11 14:18:24 -0400 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2011-10-19 15:12:55 -0400 |
commit | e70bea5fe0e3d6355fd95674eaff5aa5a32f0564 (patch) | |
tree | dad7af7a0d449c43393c9249d4634a8279580534 /fs/btrfs | |
parent | 4b91c14f913f649d4302b3677b85c4ce87a3d8e7 (diff) | |
download | blackbird-op-linux-e70bea5fe0e3d6355fd95674eaff5aa5a32f0564.tar.gz blackbird-op-linux-e70bea5fe0e3d6355fd95674eaff5aa5a32f0564.zip |
Btrfs: fix the amount of space reserved for unlink
Our unlink reservations were a bit much, we were reserving 10 and I only count 8
possible items we're touching, so comment what we're reserving for and fix the
count value. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 246397d8478f..1f013c5c36aa 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2758,7 +2758,16 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, u64 ino = btrfs_ino(inode); u64 dir_ino = btrfs_ino(dir); - trans = btrfs_start_transaction(root, 10); + /* + * 1 for the possible orphan item + * 1 for the dir item + * 1 for the dir index + * 1 for the inode ref + * 1 for the inode ref in the tree log + * 2 for the dir entries in the log + * 1 for the inode + */ + trans = btrfs_start_transaction(root, 8); if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC) return trans; |