]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: cleanup root usage by btrfs_get_alloc_profile
authorJeff Mahoney <jeffm@suse.com>
Wed, 17 May 2017 15:38:35 +0000 (11:38 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:25:59 +0000 (18:25 +0200)
commitf9f3138a13b9232cd70f9f692e34b5c808087326
treef641fee8f721be73f3808c796e93e983d132ff9e
parenta7ebcd2bafe8c11488194fdb9c72456e4febf512
btrfs: cleanup root usage by btrfs_get_alloc_profile

There are two places where we don't already know what kind of alloc
profile we need before calling btrfs_get_alloc_profile, but we need
access to a root everywhere we call it.

This patch adds helpers for btrfs_{data,metadata,system}_alloc_profile()
and relegates btrfs_system_alloc_profile to a static for use in those
two cases.  The next patch will eliminate one of those.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/super.c
fs/btrfs/volumes.c