linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md: fix return value of rdev_size_change()
@ 2010-11-11 20:25 Justin Maggard
       [not found] ` <AANLkTikEgZVC=0spvkYsXN4KWoNgbK9VMZ8EnN_VWZnf@mail.gmail.com>
  2010-11-15  1:00 ` Neil Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Justin Maggard @ 2010-11-11 20:25 UTC (permalink / raw)


When trying to grow an array by enlarging component devices, rdev_size_store()
expects the return value of rdev_size_change() to be in sectors, but the actual
value is returned in KBs.

Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
---
 drivers/md/md.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4e957f3..a0615af 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1337,7 +1337,7 @@ super_90_rdev_size_change(mdk_rdev_t *rdev, sector_t num_sectors)
 	md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
 		       rdev->sb_page);
 	md_super_wait(rdev->mddev);
-	return num_sectors / 2; /* kB for sysfs */
+	return num_sectors;
 }
 
 
@@ -1704,7 +1704,7 @@ super_1_rdev_size_change(mdk_rdev_t *rdev, sector_t num_sectors)
 	md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
 		       rdev->sb_page);
 	md_super_wait(rdev->mddev);
-	return num_sectors / 2; /* kB for sysfs */
+	return num_sectors;
 }
 
 static struct super_type super_types[] = {
-- 
1.7.1


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

end of thread, other threads:[~2010-11-15  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 20:25 [PATCH] md: fix return value of rdev_size_change() Justin Maggard
     [not found] ` <AANLkTikEgZVC=0spvkYsXN4KWoNgbK9VMZ8EnN_VWZnf@mail.gmail.com>
2010-11-11 21:01   ` Justin Maggard
2010-11-15  1:00 ` 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).