]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fiemap: preallocate ulists for btrfs_check_shared
authorDavid Sterba <dsterba@suse.com>
Wed, 15 May 2019 13:31:04 +0000 (15:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:53 +0000 (13:34 +0200)
commitf3cf8c4ddce32883c8388b136bc918e249fb24c2
tree039d2c9ea71a7d7f74d7a1ba483e8bf989d8737a
parent16a8b3f296a54fb4f9fe5f62b83487b45eb7bf5c
btrfs: fiemap: preallocate ulists for btrfs_check_shared

btrfs_check_shared looks up parents of a given extent and uses ulists
for that. These are allocated and freed repeatedly. Preallocation in the
caller will avoid the overhead and also allow us to use the GFP_KERNEL
as it is happens before the extent locks are taken.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/extent_io.c