diff options
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r-- | fs/btrfs/dev-replace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 4253ad580e39..70681686e8dc 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c | |||
@@ -148,13 +148,13 @@ no_valid_dev_replace_entry_found: | |||
148 | !btrfs_test_opt(dev_root, DEGRADED)) { | 148 | !btrfs_test_opt(dev_root, DEGRADED)) { |
149 | ret = -EIO; | 149 | ret = -EIO; |
150 | pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "srcdev (devid %llu) is missing, need to run 'btrfs dev scan'?\n", | 150 | pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "srcdev (devid %llu) is missing, need to run 'btrfs dev scan'?\n", |
151 | (unsigned long long)src_devid); | 151 | src_devid); |
152 | } | 152 | } |
153 | if (!dev_replace->tgtdev && | 153 | if (!dev_replace->tgtdev && |
154 | !btrfs_test_opt(dev_root, DEGRADED)) { | 154 | !btrfs_test_opt(dev_root, DEGRADED)) { |
155 | ret = -EIO; | 155 | ret = -EIO; |
156 | pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "tgtdev (devid %llu) is missing, need to run btrfs dev scan?\n", | 156 | pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "tgtdev (devid %llu) is missing, need to run btrfs dev scan?\n", |
157 | (unsigned long long)BTRFS_DEV_REPLACE_DEVID); | 157 | BTRFS_DEV_REPLACE_DEVID); |
158 | } | 158 | } |
159 | if (dev_replace->tgtdev) { | 159 | if (dev_replace->tgtdev) { |
160 | if (dev_replace->srcdev) { | 160 | if (dev_replace->srcdev) { |
@@ -400,7 +400,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root, | |||
400 | args->result = BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR; | 400 | args->result = BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR; |
401 | btrfs_dev_replace_unlock(dev_replace); | 401 | btrfs_dev_replace_unlock(dev_replace); |
402 | 402 | ||
403 | btrfs_wait_all_ordered_extents(root->fs_info, 0); | 403 | btrfs_wait_all_ordered_extents(root->fs_info); |
404 | 404 | ||
405 | /* force writing the updated state information to disk */ | 405 | /* force writing the updated state information to disk */ |
406 | trans = btrfs_start_transaction(root, 0); | 406 | trans = btrfs_start_transaction(root, 0); |
@@ -475,7 +475,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, | |||
475 | mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); | 475 | mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); |
476 | return ret; | 476 | return ret; |
477 | } | 477 | } |
478 | btrfs_wait_all_ordered_extents(root->fs_info, 0); | 478 | btrfs_wait_all_ordered_extents(root->fs_info); |
479 | 479 | ||
480 | trans = btrfs_start_transaction(root, 0); | 480 | trans = btrfs_start_transaction(root, 0); |
481 | if (IS_ERR(trans)) { | 481 | if (IS_ERR(trans)) { |
@@ -747,7 +747,7 @@ int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info) | |||
747 | WARN_ON(atomic_xchg( | 747 | WARN_ON(atomic_xchg( |
748 | &fs_info->mutually_exclusive_operation_running, 1)); | 748 | &fs_info->mutually_exclusive_operation_running, 1)); |
749 | task = kthread_run(btrfs_dev_replace_kthread, fs_info, "btrfs-devrepl"); | 749 | task = kthread_run(btrfs_dev_replace_kthread, fs_info, "btrfs-devrepl"); |
750 | return PTR_RET(task); | 750 | return PTR_ERR_OR_ZERO(task); |
751 | } | 751 | } |
752 | 752 | ||
753 | static int btrfs_dev_replace_kthread(void *data) | 753 | static int btrfs_dev_replace_kthread(void *data) |