David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Stefan Behrens | ff023aa | 2012-11-06 11:43:11 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) STRATO AG 2012. All rights reserved. |
Stefan Behrens | ff023aa | 2012-11-06 11:43:11 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 6 | #ifndef BTRFS_DEV_REPLACE_H |
| 7 | #define BTRFS_DEV_REPLACE_H |
Stefan Behrens | ff023aa | 2012-11-06 11:43:11 +0100 | [diff] [blame] | 8 | |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 9 | struct btrfs_ioctl_dev_replace_args; |
| 10 | |
| 11 | int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info); |
| 12 | int btrfs_run_dev_replace(struct btrfs_trans_handle *trans, |
| 13 | struct btrfs_fs_info *fs_info); |
Jeff Mahoney | 2ff7e61 | 2016-06-22 18:54:24 -0400 | [diff] [blame] | 14 | int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info, |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 15 | struct btrfs_ioctl_dev_replace_args *args); |
David Sterba | da353f6 | 2017-02-14 17:55:53 +0100 | [diff] [blame] | 16 | int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info, |
| 17 | const char *tgtdev_name, u64 srcdevid, const char *srcdev_name, |
| 18 | int read_src); |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 19 | void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info, |
| 20 | struct btrfs_ioctl_dev_replace_args *args); |
Anand Jain | 18e67c7 | 2018-02-12 23:33:31 +0800 | [diff] [blame] | 21 | int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info); |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 22 | void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info); |
| 23 | int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info); |
| 24 | int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace); |
David Sterba | 7e79cb8 | 2018-03-24 02:11:38 +0100 | [diff] [blame] | 25 | void btrfs_dev_replace_read_lock(struct btrfs_dev_replace *dev_replace); |
| 26 | void btrfs_dev_replace_read_unlock(struct btrfs_dev_replace *dev_replace); |
| 27 | void btrfs_dev_replace_write_lock(struct btrfs_dev_replace *dev_replace); |
| 28 | void btrfs_dev_replace_write_unlock(struct btrfs_dev_replace *dev_replace); |
Liu Bo | 73beece | 2015-07-17 16:49:19 +0800 | [diff] [blame] | 29 | void btrfs_dev_replace_set_lock_blocking(struct btrfs_dev_replace *dev_replace); |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 30 | |
Stefan Behrens | ff023aa | 2012-11-06 11:43:11 +0100 | [diff] [blame] | 31 | #endif |