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>
This commit is contained in:
@@ -2161,10 +2161,10 @@ static int raid1_reshape(mddev_t *mddev)
|
||||
int d, d2, err;
|
||||
|
||||
/* Cannot change chunk_size, layout, or level */
|
||||
if (mddev->chunk_size != mddev->new_chunk ||
|
||||
if (mddev->chunk_sectors << 9 != mddev->new_chunk ||
|
||||
mddev->layout != mddev->new_layout ||
|
||||
mddev->level != mddev->new_level) {
|
||||
mddev->new_chunk = mddev->chunk_size;
|
||||
mddev->new_chunk = mddev->chunk_sectors << 9;
|
||||
mddev->new_layout = mddev->layout;
|
||||
mddev->new_level = mddev->level;
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user