diff options
-rw-r--r-- | fs/btrfs/extent-tree.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 102ed3143976..5524434da059 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3586,13 +3586,7 @@ static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags) | |||
3586 | */ | 3586 | */ |
3587 | static u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags) | 3587 | static u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags) |
3588 | { | 3588 | { |
3589 | /* | 3589 | u64 num_devices = root->fs_info->fs_devices->rw_devices; |
3590 | * we add in the count of missing devices because we want | ||
3591 | * to make sure that any RAID levels on a degraded FS | ||
3592 | * continue to be honored. | ||
3593 | */ | ||
3594 | u64 num_devices = root->fs_info->fs_devices->rw_devices + | ||
3595 | root->fs_info->fs_devices->missing_devices; | ||
3596 | u64 target; | 3590 | u64 target; |
3597 | u64 tmp; | 3591 | u64 tmp; |
3598 | 3592 | ||
@@ -8440,13 +8434,7 @@ static u64 update_block_group_flags(struct btrfs_root *root, u64 flags) | |||
8440 | if (stripped) | 8434 | if (stripped) |
8441 | return extended_to_chunk(stripped); | 8435 | return extended_to_chunk(stripped); |
8442 | 8436 | ||
8443 | /* | 8437 | num_devices = root->fs_info->fs_devices->rw_devices; |
8444 | * we add in the count of missing devices because we want | ||
8445 | * to make sure that any RAID levels on a degraded FS | ||
8446 | * continue to be honored. | ||
8447 | */ | ||
8448 | num_devices = root->fs_info->fs_devices->rw_devices + | ||
8449 | root->fs_info->fs_devices->missing_devices; | ||
8450 | 8438 | ||
8451 | stripped = BTRFS_BLOCK_GROUP_RAID0 | | 8439 | stripped = BTRFS_BLOCK_GROUP_RAID0 | |
8452 | BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 | | 8440 | BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 | |