diff options
Diffstat (limited to 'fs/btrfs/dev-replace.c')
| -rw-r--r-- | fs/btrfs/dev-replace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 2af6e66fe788..eea26e1b2fda 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include "check-integrity.h" | 36 | #include "check-integrity.h" |
| 37 | #include "rcu-string.h" | 37 | #include "rcu-string.h" |
| 38 | #include "dev-replace.h" | 38 | #include "dev-replace.h" |
| 39 | #include "sysfs.h" | ||
| 39 | 40 | ||
| 40 | static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, | 41 | static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, |
| 41 | int scrub_ret); | 42 | int scrub_ret); |
| @@ -562,6 +563,10 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, | |||
| 562 | fs_info->fs_devices->latest_bdev = tgt_device->bdev; | 563 | fs_info->fs_devices->latest_bdev = tgt_device->bdev; |
| 563 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); | 564 | list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list); |
| 564 | 565 | ||
| 566 | /* replace the sysfs entry */ | ||
| 567 | btrfs_kobj_rm_device(fs_info, src_device); | ||
| 568 | btrfs_kobj_add_device(fs_info, tgt_device); | ||
| 569 | |||
| 565 | btrfs_rm_dev_replace_blocked(fs_info); | 570 | btrfs_rm_dev_replace_blocked(fs_info); |
| 566 | 571 | ||
| 567 | btrfs_rm_dev_replace_srcdev(fs_info, src_device); | 572 | btrfs_rm_dev_replace_srcdev(fs_info, src_device); |
