From: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org,
Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Subject: Re: [PATCH 2/2] imsm: abort reshape if sync_action is not "reshape"
Date: Thu, 24 Dec 2015 10:04:36 +1100 [thread overview]
Message-ID: <874mf822d7.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1450871831-25452-2-git-send-email-artur.paszkiewicz@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]
On Wed, Dec 23 2015, Artur Paszkiewicz wrote:
> When reshape was interrupted, an incorrect checkpoint would be saved in
> the migration record. Change wait_for_reshape_imsm() to return -1 when
> sync_action is not "reshape" to abort early in imsm_manage_reshape()
> without writing the migration record.
>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
> super-intel.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index e609e0c..c7efa98 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -10300,8 +10300,10 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
> sysfs_wait(fd, NULL);
> if (sysfs_get_str(sra, NULL, "sync_action",
> action, 20) > 0 &&
> - strncmp(action, "reshape", 7) != 0)
> - break;
> + strncmp(action, "reshape", 7) != 0) {
> + close(fd);
> + return -1;
> + }
> if (sysfs_fd_get_ll(fd, &completed) < 0) {
> dprintf("cannot read reshape_position (in loop)\n");
> close(fd);
> --
Applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2015-12-23 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 11:57 [PATCH 1/2] Grow: close file descriptor earlier to avoid "still in use" when stopping Artur Paszkiewicz
2015-12-23 11:57 ` [PATCH 2/2] imsm: abort reshape if sync_action is not "reshape" Artur Paszkiewicz
2015-12-23 23:04 ` NeilBrown [this message]
2015-12-23 23:00 ` [PATCH 1/2] Grow: close file descriptor earlier to avoid "still in use" when stopping NeilBrown
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=874mf822d7.fsf@notabene.neil.brown.name \
--to=neilb@suse.de \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
/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).