linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject:[PATCH 001:013]: md: Raid0 reshape
@ 2009-06-16 21:51 raz ben yehuda
  2009-06-16 23:24 ` Bill Davidsen
  2009-06-17  8:12 ` Andre Noll
  0 siblings, 2 replies; 8+ messages in thread
From: raz ben yehuda @ 2009-06-16 21:51 UTC (permalink / raw)
  To: linux raid, Neil Brown

md assumes that personality has all its membes of the same
size,A fact that is incorrect for raid0.

 md.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Signed-off-by: razb <raziebe@gmail.com>
---
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0f11fd1..e14fb90 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5683,7 +5683,8 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev)
 		max_sectors = mddev->resync_max_sectors;
 	else
 		max_sectors = mddev->dev_sectors;
-
+	if (mddev->level == 0)
+		max_sectors = mddev->resync_max_sectors;
 	/*
 	 * Should not happen.
 	 */
@@ -6280,7 +6281,13 @@ void md_do_sync(mddev_t *mddev)
 			    rdev->recovery_offset < j)
 				j = rdev->recovery_offset;
 	}
-
+	/*
+	* raid0 members may not be of the same size,use array_size.
+	*/
+	if (mddev->level == 0) {
+		max_sectors = mddev->array_sectors;
+		j = mddev->recovery_cp;
+	}
 	printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev));
 	printk(KERN_INFO "md: minimum _guaranteed_  speed:"
 		" %d KB/sec/disk.\n", speed_min(mddev));





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

end of thread, other threads:[~2009-06-18 11:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 21:51 Subject:[PATCH 001:013]: md: Raid0 reshape raz ben yehuda
2009-06-16 23:24 ` Bill Davidsen
2009-06-17 10:25   ` raz ben yehuda
2009-06-17 13:30     ` Bill Davidsen
2009-06-17  8:12 ` Andre Noll
2009-06-17  8:23   ` Raz
2009-06-17 16:23     ` Andre Noll
2009-06-18 11:42       ` Raz

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