From: Adam Kwolek <adam.kwolek@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: [PATCH 5/6] FIX: Container can be left frozen
Date: Tue, 08 Feb 2011 14:31:09 +0100 [thread overview]
Message-ID: <20110208133109.8787.93211.stgit@gklab-128-013.igk.intel.com> (raw)
In-Reply-To: <20110208131046.8787.1777.stgit@gklab-128-013.igk.intel.com>
When container operation fails before child process starts,
array can be left frozen because container_reshape() doesn't make
unfreeze() operation in all error cases, as it is responsible for.
add unfreeze() operation for error case scenarios in reshape_container()
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---
Grow.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Grow.c b/Grow.c
index 09d7439..e77ab80 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2123,8 +2123,10 @@ int reshape_container(char *container, int cfd, char *devname,
if (reshape_super(st, -1, info->new_level,
info->new_layout, info->new_chunk,
info->array.raid_disks + info->delta_disks,
- backup_file, devname, quiet))
+ backup_file, devname, quiet)) {
+ unfreeze(st);
return 1;
+ }
sync_metadata(st);
@@ -2135,6 +2137,7 @@ int reshape_container(char *container, int cfd, char *devname,
switch (fork()) {
case -1: /* error */
perror("Cannot fork to complete reshape\n");
+ unfreeze(st);
return 1;
default: /* parent */
printf(Name ": multi-array reshape continues in background\n");
next prev parent reply other threads:[~2011-02-08 13:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 13:30 [PATCH 0/6] Reshape fixes (expansion) Adam Kwolek
2011-02-08 13:30 ` [PATCH 1/6] imsm: FIX: Wrong output string format Adam Kwolek
2011-02-08 13:30 ` [PATCH 2/6] UT FIX: imsm container can have different blocks number Adam Kwolek
2011-02-08 13:30 ` [PATCH 3/6] FIX: Compare the same units Adam Kwolek
2011-02-08 13:31 ` [PATCH 4/6] FIX: compare blocks on all data disks Adam Kwolek
2011-02-08 13:31 ` Adam Kwolek [this message]
2011-02-08 13:31 ` [PATCH 6/6] FIX: md runs recovery instead reshape for growing single disk raid0 array Adam Kwolek
2011-02-09 3:10 ` [PATCH 0/6] Reshape fixes (expansion) NeilBrown
2011-02-09 7:31 ` Kwolek, Adam
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=20110208133109.8787.93211.stgit@gklab-128-013.igk.intel.com \
--to=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=wojciech.neubauer@intel.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