]> asedeno.scripts.mit.edu Git - linux.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)
commit929be17a9b49b10743c3db304f939d27da1abd2f
tree8dde03ac85d946a9d09bb6fb5b4f3f41a67ef614
parent45bfcfc168f84f498d9825ec20ff3f4ee9208e04
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