aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard10@gmail.com>2010-11-24 00:36:17 -0500
committerNeilBrown <neilb@suse.de>2010-11-24 00:36:17 -0500
commitc26a44ed1e552aaa1d4ceb71842002d235fe98d7 (patch)
tree47e0d62c2693ae60ae7a5bc44c2dfcd6a2f7e47e /drivers/md/md.c
parent3561d43fd289f590fdae672e5eb831b8d5cf0bf6 (diff)
md: fix return value of rdev_size_change()
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. This functionality was broken by commit dd8ac336c13fd8afdb082ebacb1cddd5cf727889 so this patch is suitable for any kernel since 2.6.30. Cc: stable@kernel.org Signed-off-by: Justin Maggard <jmaggard10@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 324a3663fcda..7b9e229a05e2 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)
1337 md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size, 1337 md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
1338 rdev->sb_page); 1338 rdev->sb_page);
1339 md_super_wait(rdev->mddev); 1339 md_super_wait(rdev->mddev);
1340 return num_sectors / 2; /* kB for sysfs */ 1340 return num_sectors;
1341} 1341}
1342 1342
1343 1343
@@ -1704,7 +1704,7 @@ super_1_rdev_size_change(mdk_rdev_t *rdev, sector_t num_sectors)
1704 md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size, 1704 md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
1705 rdev->sb_page); 1705 rdev->sb_page);
1706 md_super_wait(rdev->mddev); 1706 md_super_wait(rdev->mddev);
1707 return num_sectors / 2; /* kB for sysfs */ 1707 return num_sectors;
1708} 1708}
1709 1709
1710static struct super_type super_types[] = { 1710static struct super_type super_types[] = {