]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: make ALLOC_CHUNK use the space info flags
authorJosef Bacik <josef@toxicpanda.com>
Tue, 21 Jul 2020 14:22:16 +0000 (10:22 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:51 +0000 (12:06 +0200)
commitf5cf222c56d0c0c36d013fcfa9c4ffeb606bafac
treeec672af3835eec44c97e782848665de8357fa2ac
parent2eec9e98ed28e10fae44b54c5df09def368edfeb
btrfs: make ALLOC_CHUNK use the space info flags

We have traditionally used flush_space() to flush metadata space, so
we've been unconditionally using btrfs_metadata_alloc_profile() for our
profile to allocate a chunk. However if we're going to use this for
data we need to use btrfs_get_alloc_profile() on the space_info we pass
in.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c