linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FIX: delta_disk can have UnSet value
@ 2011-01-27  9:28 Adam Kwolek
  2011-01-28  1:18 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Kwolek @ 2011-01-27  9:28 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer

Delta_disk can be set to UnSet value.
This can a cause to pass wrong parameter to reshape_super().

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

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

diff --git a/Grow.c b/Grow.c
index daf310b..bc015c6 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1575,7 +1575,9 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
 
 		if (reshape_super(st, info.component_size, info.new_level,
 				  info.new_layout, info.new_chunk,
-				  info.array.raid_disks + info.delta_disks,
+				  info.delta_disks == UnSet ?
+				     info.array.raid_disks :
+				     info.array.raid_disks + info.delta_disks,
 				  backup_file, devname, quiet)) {
 			rv = 1;
 			goto release;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-28  1:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-27  9:28 [PATCH] FIX: delta_disk can have UnSet value Adam Kwolek
2011-01-28  1:18 ` Neil Brown

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).