linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Two fixes for PPL recovery
@ 2017-09-29 20:54 Artur Paszkiewicz
  2017-09-29 20:54 ` [PATCH 1/2] raid5-ppl: don't resync after rebuild Artur Paszkiewicz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Artur Paszkiewicz @ 2017-09-29 20:54 UTC (permalink / raw)
  To: shli; +Cc: linux-raid, Artur Paszkiewicz

These patches fix some issues that can occur when array rebuild starts after
ppl recovery.

Artur Paszkiewicz (2):
  raid5-ppl: don't resync after rebuild
  raid5-ppl: check recovery_offset when performing ppl recovery

 drivers/md/raid5-ppl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.14.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] raid5-ppl: don't resync after rebuild
  2017-09-29 20:54 [PATCH 0/2] Two fixes for PPL recovery Artur Paszkiewicz
@ 2017-09-29 20:54 ` Artur Paszkiewicz
  2017-09-29 20:54 ` [PATCH 2/2] raid5-ppl: check recovery_offset when performing ppl recovery Artur Paszkiewicz
  2017-09-30  6:05 ` [PATCH 0/2] Two fixes for PPL recovery Shaohua Li
  2 siblings, 0 replies; 4+ messages in thread
From: Artur Paszkiewicz @ 2017-09-29 20:54 UTC (permalink / raw)
  To: shli; +Cc: linux-raid, Artur Paszkiewicz

The check for degraded array is unnecessary and causes a resync to be
performed after ppl recovery and rebuild when restarting an array during
rebuilding after unclean shutdown.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
---
 drivers/md/raid5-ppl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index a98ef172f8e8..2c6513777f68 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -1296,8 +1296,7 @@ int ppl_init_log(struct r5conf *conf)
 
 	if (ret) {
 		goto err;
-	} else if (!mddev->pers &&
-		   mddev->recovery_cp == 0 && !mddev->degraded &&
+	} else if (!mddev->pers && mddev->recovery_cp == 0 &&
 		   ppl_conf->recovered_entries > 0 &&
 		   ppl_conf->mismatch_count == 0) {
 		/*
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] raid5-ppl: check recovery_offset when performing ppl recovery
  2017-09-29 20:54 [PATCH 0/2] Two fixes for PPL recovery Artur Paszkiewicz
  2017-09-29 20:54 ` [PATCH 1/2] raid5-ppl: don't resync after rebuild Artur Paszkiewicz
@ 2017-09-29 20:54 ` Artur Paszkiewicz
  2017-09-30  6:05 ` [PATCH 0/2] Two fixes for PPL recovery Shaohua Li
  2 siblings, 0 replies; 4+ messages in thread
From: Artur Paszkiewicz @ 2017-09-29 20:54 UTC (permalink / raw)
  To: shli; +Cc: linux-raid, Artur Paszkiewicz

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>
---
 drivers/md/raid5-ppl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 2c6513777f68..c3e1899d5986 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;
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Two fixes for PPL recovery
  2017-09-29 20:54 [PATCH 0/2] Two fixes for PPL recovery Artur Paszkiewicz
  2017-09-29 20:54 ` [PATCH 1/2] raid5-ppl: don't resync after rebuild Artur Paszkiewicz
  2017-09-29 20:54 ` [PATCH 2/2] raid5-ppl: check recovery_offset when performing ppl recovery Artur Paszkiewicz
@ 2017-09-30  6:05 ` Shaohua Li
  2 siblings, 0 replies; 4+ messages in thread
From: Shaohua Li @ 2017-09-30  6:05 UTC (permalink / raw)
  To: Artur Paszkiewicz; +Cc: linux-raid

On Fri, Sep 29, 2017 at 10:54:17PM +0200, Artur Paszkiewicz wrote:
> These patches fix some issues that can occur when array rebuild starts after
> ppl recovery.
> 
> Artur Paszkiewicz (2):
>   raid5-ppl: don't resync after rebuild
>   raid5-ppl: check recovery_offset when performing ppl recovery

applied, thanks! 
>  drivers/md/raid5-ppl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-30  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 20:54 [PATCH 0/2] Two fixes for PPL recovery Artur Paszkiewicz
2017-09-29 20:54 ` [PATCH 1/2] raid5-ppl: don't resync after rebuild Artur Paszkiewicz
2017-09-29 20:54 ` [PATCH 2/2] raid5-ppl: check recovery_offset when performing ppl recovery Artur Paszkiewicz
2017-09-30  6:05 ` [PATCH 0/2] Two fixes for PPL recovery Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).