Linux RAID subsystem development
 help / color / mirror / Atom feed
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 4/6] FIX: compare blocks on all data disks
Date: Tue, 08 Feb 2011 14:31:01 +0100	[thread overview]
Message-ID: <20110208133101.8787.581.stgit@gklab-128-013.igk.intel.com> (raw)
In-Reply-To: <20110208131046.8787.1777.stgit@gklab-128-013.igk.intel.com>

blocks are counted for all data disks.
component_size value is given for one array disk only.
This means we should multiple component_size by data disks number
to get similar (compare able) values.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---

 Grow.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Grow.c b/Grow.c
index 6a9e81e..09d7439 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1829,7 +1829,8 @@ started:
 		fprintf(stderr, Name ": Need to backup %luK of critical "
 			"section..\n", blocks/2);
 
-	if (blocks >= sra->component_size) {
+	disks = min(reshape.before.data_disks, reshape.after.data_disks);
+	if (blocks >= sra->component_size * disks) {
 		fprintf(stderr, Name ": %s: Something wrong"
 			" - reshape aborted\n",
 			devname);


  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 ` Adam Kwolek [this message]
2011-02-08 13:31 ` [PATCH 5/6] FIX: Container can be left frozen Adam Kwolek
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=20110208133101.8787.581.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