diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-10-05 23:12:43 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 20:08:07 +0300 |
commit | faa775c41d655a4786e9d53cb075a77bb5a75f66 (patch) | |
tree | 72087feb56f555f84f6632d57650b84049482809 /fs/btrfs/volumes.h | |
parent | 562d7b1512f7369a19bca2883e2e8672d78f0481 (diff) | |
download | linux-faa775c41d655a4786e9d53cb075a77bb5a75f66.tar.xz |
btrfs: add a btrfs_get_dev_args_from_path helper
We are going to want to populate our device lookup args outside of any
locks and then do the actual device lookup later, so add a helper to do
this work and make btrfs_find_device_by_devspec() use this helper for
now.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index bdcf7641e0bb..acf7c1307e14 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -520,9 +520,13 @@ void btrfs_assign_next_active_device(struct btrfs_device *device, struct btrfs_device *btrfs_find_device_by_devspec(struct btrfs_fs_info *fs_info, u64 devid, const char *devpath); +int btrfs_get_dev_args_from_path(struct btrfs_fs_info *fs_info, + struct btrfs_dev_lookup_args *args, + const char *path); struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info, const u64 *devid, const u8 *uuid); +void btrfs_put_dev_args_from_path(struct btrfs_dev_lookup_args *args); void btrfs_free_device(struct btrfs_device *device); int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path, u64 devid, |