summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2018-04-09 11:01:21 +0200
committerShaohua Li <shli@fb.com>2018-04-09 17:39:36 +0200
commit0ea9924abe125a0c1277484f1a3d512b3f45c320 (patch)
tree9b4f1e466e3ed62759dcdc2af804ee75c94e7dd3 /drivers
parentMerge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff)
downloadlinux-0ea9924abe125a0c1277484f1a3d512b3f45c320.tar.xz
linux-0ea9924abe125a0c1277484f1a3d512b3f45c320.zip
md-cluster: don't update recovery_offset for faulty device
Device could become faulty when clustered array handling METADATA_UPDATED msg, so we don't need to call read_rdev for this device. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 3bea45e8ccff..c208c01f63a5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -9256,8 +9256,10 @@ void md_reload_sb(struct mddev *mddev, int nr)
check_sb_changes(mddev, rdev);
/* Read all rdev's to update recovery_offset */
- rdev_for_each_rcu(rdev, mddev)
- read_rdev(mddev, rdev);
+ rdev_for_each_rcu(rdev, mddev) {
+ if (!test_bit(Faulty, &rdev->flags))
+ read_rdev(mddev, rdev);
+ }
}
EXPORT_SYMBOL(md_reload_sb);