diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2012-11-05 08:42:30 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2012-12-12 17:15:33 -0500 |
commit | 7ba15b7d211846c187a7c5dc75a5964476f8bc89 (patch) | |
tree | 7af9534b30451d08e4dca7e8f4076d09773cfeb8 /fs/btrfs/volumes.h | |
parent | beaf8ab3afef27ed81255d9808b67f6d390ca06f (diff) |
Btrfs: add two more find_device() methods
The new function btrfs_find_device_missing_or_by_path() will be
used for the device replace procedure. This function itself calls
the second new function btrfs_find_device_by_path().
Unfortunately, it is not possible to currently make the rest of the
code use these functions as well, since all functions that look
similar at first view are all a little bit different in what they
are doing. But in the future, new code could benefit from these
two new functions, and currently, device replace uses them.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 1789cda57efb..657bb12b3069 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -268,6 +268,11 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, | |||
268 | struct btrfs_fs_devices **fs_devices_ret); | 268 | struct btrfs_fs_devices **fs_devices_ret); |
269 | int btrfs_close_devices(struct btrfs_fs_devices *fs_devices); | 269 | int btrfs_close_devices(struct btrfs_fs_devices *fs_devices); |
270 | void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices); | 270 | void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices); |
271 | int btrfs_find_device_missing_or_by_path(struct btrfs_root *root, | ||
272 | char *device_path, | ||
273 | struct btrfs_device **device); | ||
274 | int btrfs_find_device_by_path(struct btrfs_root *root, char *device_path, | ||
275 | struct btrfs_device **device); | ||
271 | int btrfs_add_device(struct btrfs_trans_handle *trans, | 276 | int btrfs_add_device(struct btrfs_trans_handle *trans, |
272 | struct btrfs_root *root, | 277 | struct btrfs_root *root, |
273 | struct btrfs_device *device); | 278 | struct btrfs_device *device); |