]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make btrfs_root::free_objectid hold the next available objectid
authorNikolay Borisov <nborisov@suse.com>
Mon, 7 Dec 2020 15:32:36 +0000 (17:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:58:50 +0000 (22:58 +0100)
commitb150461460607436e7465df90f8ab24471c36e2d
tree749e513da2f0c46d71fcd6e32c09031bb82663d6
parentc9a2c2a39f938e941db155c08eaea4911424fdda
btrfs: make btrfs_root::free_objectid hold the next available objectid

Adjust the way free_objectid is being initialized, it now stores
BTRFS_FIRST_FREE_OBJECTID rather than the, somewhat arbitrary,
BTRFS_FIRST_FREE_OBJECTID - 1. This change also has the added benefit
that now it becomes unnecessary to explicitly initialize free_objectid
for a newly create fs root.

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