diff options
Diffstat (limited to 'fs/btrfs/dev-replace.c')
| -rw-r--r-- | fs/btrfs/dev-replace.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index a64435359385..9efb94e95858 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c | |||
| @@ -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)) { |
| @@ -535,10 +535,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, | |||
| 535 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); | 535 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); |
| 536 | 536 | ||
| 537 | btrfs_rm_dev_replace_srcdev(fs_info, src_device); | 537 | btrfs_rm_dev_replace_srcdev(fs_info, src_device); |
| 538 | if (src_device->bdev) { | 538 | |
| 539 | /* zero out the old super */ | ||
| 540 | btrfs_scratch_superblock(src_device); | ||
| 541 | } | ||
| 542 | /* | 539 | /* |
| 543 | * this is again a consistent state where no dev_replace procedure | 540 | * this is again a consistent state where no dev_replace procedure |
| 544 | * is running, the target device is part of the filesystem, the | 541 | * is running, the target device is part of the filesystem, the |
