summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2017-09-29 23:54:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-20 12:10:36 +0300
commit339aba679813ff1fabde362147919d3f6e536568 (patch)
tree2a49906372ffb62357cdeeceda1867482c0a4113 /drivers/md
parentb197f67ccfeb86d180a152796b5e3b7de1f611ef (diff)
downloadlinux-339aba679813ff1fabde362147919d3f6e536568.tar.xz
raid5-ppl: check recovery_offset when performing ppl recovery
[ Upstream commit 07719ff767dcd8cc42050f185d332052f3816546 ] If starting an array that is undergoing rebuild, make ppl recovery honor the recovery_offset of a member disk and don't read data that is not yet in-sync. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5-ppl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index cd026c88f7ef..702b76008886 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -758,7 +758,8 @@ static int ppl_recover_entry(struct ppl_log *log, struct ppl_header_entry *e,
(unsigned long long)sector);
rdev = conf->disks[dd_idx].rdev;
- if (!rdev) {
+ if (!rdev || (!test_bit(In_sync, &rdev->flags) &&
+ sector >= rdev->recovery_offset)) {
pr_debug("%s:%*s data member disk %d missing\n",
__func__, indent, "", dd_idx);
update_parity = false;