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); |
David Sterba | 2b584c6 | 2019-03-20 16:51:44 +0100 | [diff] [blame] | 12 | int btrfs_run_dev_replace(struct btrfs_trans_handle *trans); |
Jeff Mahoney | 2ff7e61 | 2016-06-22 18:54:24 -0400 | [diff] [blame] | 13 | int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info, |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 14 | struct btrfs_ioctl_dev_replace_args *args); |
| 15 | void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info, |
| 16 | struct btrfs_ioctl_dev_replace_args *args); |
Anand Jain | 18e67c7 | 2018-02-12 23:33:31 +0800 | [diff] [blame] | 17 | int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info); |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 18 | void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info); |
| 19 | int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info); |
David Sterba | e1f60a6 | 2019-10-01 19:57:39 +0200 | [diff] [blame] | 20 | int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace); |
Naohiro Aota | 78ce9fc | 2021-02-04 19:22:11 +0900 | [diff] [blame] | 21 | bool btrfs_finish_block_group_to_copy(struct btrfs_device *srcdev, |
| 22 | struct btrfs_block_group *cache, |
| 23 | u64 physical); |
Stefan Behrens | e93c89c | 2012-11-05 17:33:06 +0100 | [diff] [blame] | 24 | |
Stefan Behrens | ff023aa | 2012-11-06 11:43:11 +0100 | [diff] [blame] | 25 | #endif |