]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Switch btrfs_trim_free_extents to find_first_clear_extent_bit
authorNikolay Borisov <nborisov@suse.com>
Wed, 27 Mar 2019 12:24:18 +0000 (14:24 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:38 +0000 (19:02 +0200)
commite206aa42ddb539cceee5450d48d1cf5fd61b18cc
tree8dde03ac85d946a9d09bb6fb5b4f3f41a67ef614
parent8fbe33d7fa00043f7959d2f4a00f01678c398d3f
btrfs: Switch btrfs_trim_free_extents to find_first_clear_extent_bit

Instead of always calling the allocator to search for a free extent,
that satisfies the input criteria, switch btrfs_trim_free_extents to
using find_first_clear_extent_bit. With this change it's no longer
necessary to read the device tree in order to figure out holes in
the devices.

Now the code always searches in-memory data structure to figure out the
space range which contains the requested which should result in speed
improvements.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c