Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07719ff7 authored by Artur Paszkiewicz's avatar Artur Paszkiewicz Committed by Shaohua Li
Browse files

raid5-ppl: check recovery_offset when performing ppl recovery



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: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 611426e2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;