diff options
author | bingjingc <bingjingc@synology.com> | 2017-11-17 10:57:44 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-12-01 11:27:32 -0800 |
commit | aff69d89bdebc39235cddb4445371eb979b49685 (patch) | |
tree | 9cf208c4b30fb844b3fe8a1c1f1dd2121976d53a /drivers/md/raid5-cache.c | |
parent | a0651c7fa2c088a605f63792279859608ed7f2c8 (diff) | |
download | linux-stable-aff69d89bdebc39235cddb4445371eb979b49685.tar.gz linux-stable-aff69d89bdebc39235cddb4445371eb979b49685.tar.bz2 linux-stable-aff69d89bdebc39235cddb4445371eb979b49685.zip |
md/raid5: correct degraded calculation in raid5_error
When disk failure occurs on new disks for reshape, mddev->degraded
is not calculated correctly. Faulty bit of the failure device is not
set before raid5_calc_degraded(conf).
mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/loop[012]
mdadm /dev/md0 -a /dev/loop3
mdadm /dev/md0 --grow -n4
mdadm /dev/md0 -f /dev/loop3 # simulating disk failure
cat /sys/block/md0/md/degraded # it outputs 0, but it should be 1.
However, mdadm -D /dev/md0 will show that it is degraded. It's a bug.
It can be fixed by moving the resources raid5_calc_degraded() depends
on before it.
Reported-by: Roy Chung <roychung@synology.com>
Reviewed-by: Alex Wu <alexwu@synology.com>
Signed-off-by: BingJing Chang <bingjingc@synology.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
0 files changed, 0 insertions, 0 deletions