From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
To: linux-raid@vger.kernel.org
Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Subject: [PATCH 2/2] imsm: don't update migration record when reshape is interrupted
Date: Tue, 5 Jan 2016 17:16:16 +0100 [thread overview]
Message-ID: <1452010576-10733-2-git-send-email-artur.paszkiewicz@intel.com> (raw)
In-Reply-To: <1452010576-10733-1-git-send-email-artur.paszkiewicz@intel.com>
Abort imsm_manage_reshape() without updating the migration record if any
error occurs when checking progress. If reshape is interrupted and the
migration record is then updated, the checkpoint will be wrong and will
cause reshape to fail when the array is restarted.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
---
super-intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 68cc8d6..abf48c0 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10277,7 +10277,7 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
if (sysfs_fd_get_ll(fd, &completed) < 0) {
dprintf("cannot read reshape_position (no reshape in progres)\n");
close(fd);
- return 0;
+ return 1;
}
if (completed > position_to_set) {
@@ -10566,7 +10566,7 @@ static int imsm_manage_reshape(
sra->reshape_progress = next_step;
/* wait until reshape finish */
- if (wait_for_reshape_imsm(sra, ndata) < 0) {
+ if (wait_for_reshape_imsm(sra, ndata)) {
dprintf("wait_for_reshape_imsm returned error!\n");
goto abort;
}
--
2.1.4
next prev parent reply other threads:[~2016-01-05 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 16:16 [PATCH 1/2] imsm: use timeout when waiting for reshape progress Artur Paszkiewicz
2016-01-05 16:16 ` Artur Paszkiewicz [this message]
2016-01-07 0:11 ` 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=1452010576-10733-2-git-send-email-artur.paszkiewicz@intel.com \
--to=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).