]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: only reserve metadata_size for inodes
authorJosef Bacik <josef@toxicpanda.com>
Thu, 22 Aug 2019 19:14:34 +0000 (15:14 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:13 +0000 (14:59 +0200)
commit88cff4e1a8b0708152a13e2b28c763a1d5c0ad08
tree481e67d8463ee70ccc7fe329918decd279bde6f8
parent94df615e620b5629a9cd889c31c6592799050728
btrfs: only reserve metadata_size for inodes

Historically we reserved worst case for every btree operation, and
generally speaking we want to do that in cases where it could be the
worst case.  However for updating inodes we know the inode items are
already in the tree, so it will only be an update operation and never an
insert operation.  This allows us to always reserve only the
metadata_size amount for inode updates rather than the
insert_metadata_size amount.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delalloc-space.c
fs/btrfs/delayed-inode.c