linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nigel Croxon <ncroxon@redhat.com>
To: linux-raid@vger.kernel.org, jes@trained-monkey.org,
	Xiao Ni <xni@redhat.com>
Subject: Re: [PATCH] mdadm: fix reshape from RAID5 to RAID6 with backup file
Date: Tue, 16 Feb 2021 09:28:02 -0500	[thread overview]
Message-ID: <8BA6E41D-F35C-4261-88BE-6A32EB27F57D@redhat.com> (raw)
In-Reply-To: <20210120200542.19139-1-ncroxon@redhat.com>

Any update on accepting this patch ?

> On Jan 20, 2021, at 3:05 PM, Nigel Croxon <ncroxon@redhat.com> wrote:
> 
> Reshaping a 3-disk RAID5 to 4-disk RAID6 will cause a hang of
> the resync after the grow.
> 
> Adding a spare disk to avoid degrading the array when growing
> is successful, but not successful when supplying a backup file
> on the command line. If the reshape job is not already running,
> set the sync_max value to max.
> 
> Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
> ---
> Grow.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Grow.c b/Grow.c
> index 6b8321c..5c2512f 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -931,12 +931,15 @@ int start_reshape(struct mdinfo *sra, int already_running,
> 	err = err ?: sysfs_set_num(sra, NULL, "sync_max", sync_max_to_set);
> 	if (!already_running && err == 0) {
> 		int cnt = 5;
> +		int err2;
> 		do {
> 			err = sysfs_set_str(sra, NULL, "sync_action",
> 					    "reshape");
> -			if (err)
> +			err2 = sysfs_set_str(sra, NULL, "sync_max",
> +					    "max");
> +			if (err || err2)
> 				sleep(1);
> -		} while (err && errno == EBUSY && cnt-- > 0);
> +		} while (err && err2 && errno == EBUSY && cnt-- > 0);
> 	}
> 	return err;
> }
> -- 
> 2.20.1
> 


  reply	other threads:[~2021-02-16 14:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 20:05 [PATCH] mdadm: fix reshape from RAID5 to RAID6 with backup file Nigel Croxon
2021-02-16 14:28 ` Nigel Croxon [this message]
2021-02-26 22:06 ` Jes Sorensen
2021-03-16 14:54   ` Tkaczyk, Mariusz
2021-03-16 15:21     ` Nigel Croxon
2021-03-16 15:51     ` Nigel Croxon
2021-03-16 15:59     ` Nigel Croxon
2021-03-17  8:34       ` Tkaczyk, Mariusz
     [not found] <764426808.38181143.1615910368475.JavaMail.zimbra () redhat ! com>
2021-03-22 16:21 ` Oleksandr Shchirskyi
2021-03-22 16:47   ` Nigel Croxon
2021-03-22 17:16   ` Nigel Croxon
2021-03-22 17:41     ` Oleksandr Shchirskyi
2021-03-23 16:36       ` Nigel Croxon
2021-03-23 20:58         ` Oleksandr Shchirskyi
2021-03-26 11:59           ` Nigel Croxon
2021-04-01 20:49             ` Jes Sorensen
2021-04-02  9:40               ` Oleksandr Shchirskyi
2021-04-06 18:31                 ` Jes Sorensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8BA6E41D-F35C-4261-88BE-6A32EB27F57D@redhat.com \
    --to=ncroxon@redhat.com \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=xni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).