blob: 3911049a5f231b24e5aa65319568c4d238968e0e [file] [log] [blame]
David Sterba9888c342018-04-03 19:16:55 +02001/* SPDX-License-Identifier: GPL-2.0 */
Stefan Behrensff023aa2012-11-06 11:43:11 +01002/*
3 * Copyright (C) STRATO AG 2012. All rights reserved.
Stefan Behrensff023aa2012-11-06 11:43:11 +01004 */
5
David Sterba9888c342018-04-03 19:16:55 +02006#ifndef BTRFS_DEV_REPLACE_H
7#define BTRFS_DEV_REPLACE_H
Stefan Behrensff023aa2012-11-06 11:43:11 +01008
Stefan Behrense93c89c2012-11-05 17:33:06 +01009struct btrfs_ioctl_dev_replace_args;
10
11int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
David Sterba2b584c62019-03-20 16:51:44 +010012int btrfs_run_dev_replace(struct btrfs_trans_handle *trans);
Jeff Mahoney2ff7e612016-06-22 18:54:24 -040013int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
Stefan Behrense93c89c2012-11-05 17:33:06 +010014 struct btrfs_ioctl_dev_replace_args *args);
15void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
16 struct btrfs_ioctl_dev_replace_args *args);
Anand Jain18e67c72018-02-12 23:33:31 +080017int btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info);
Stefan Behrense93c89c2012-11-05 17:33:06 +010018void btrfs_dev_replace_suspend_for_unmount(struct btrfs_fs_info *fs_info);
19int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info);
David Sterbae1f60a62019-10-01 19:57:39 +020020int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace);
Naohiro Aota78ce9fc2021-02-04 19:22:11 +090021bool btrfs_finish_block_group_to_copy(struct btrfs_device *srcdev,
22 struct btrfs_block_group *cache,
23 u64 physical);
Stefan Behrense93c89c2012-11-05 17:33:06 +010024
Stefan Behrensff023aa2012-11-06 11:43:11 +010025#endif