aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2009-06-17 18:45:01 -0400
committerNeilBrown <neilb@suse.de>2009-06-17 18:45:01 -0400
commit9d8f0363623b3da12c43007cf77f5e1a4e8a5964 (patch)
tree0fee53971a397ade209dd36c4f1ed50db6450faf /drivers/md/raid1.c
parentfbb704efb784e2c8418e34dc3013af76bdd58101 (diff)
md: Make mddev->chunk_size sector-based.
This patch renames the chunk_size field to chunk_sectors with the implied change of semantics. Since is_power_of_2(chunk_size) = is_power_of_2(chunk_sectors << 9) = is_power_of_2(chunk_sectors) these bits don't need an adjustment for the shift. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 5ea5bca53a5e..388635735ae5 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2161,10 +2161,10 @@ static int raid1_reshape(mddev_t *mddev)
2161 int d, d2, err; 2161 int d, d2, err;
2162 2162
2163 /* Cannot change chunk_size, layout, or level */ 2163 /* Cannot change chunk_size, layout, or level */
2164 if (mddev->chunk_size != mddev->new_chunk || 2164 if (mddev->chunk_sectors << 9 != mddev->new_chunk ||
2165 mddev->layout != mddev->new_layout || 2165 mddev->layout != mddev->new_layout ||
2166 mddev->level != mddev->new_level) { 2166 mddev->level != mddev->new_level) {
2167 mddev->new_chunk = mddev->chunk_size; 2167 mddev->new_chunk = mddev->chunk_sectors << 9;
2168 mddev->new_layout = mddev->layout; 2168 mddev->new_layout = mddev->layout;
2169 mddev->new_level = mddev->level; 2169 mddev->new_level = mddev->level;
2170 return -EINVAL; 2170 return -EINVAL;