md: Convert mddev->new_chunk to sectors.

A straight-forward conversion which gets rid of some
multiplications/divisions/shifts. The patch also introduces a couple
of new ones, most of which are due to conf->chunk_size still being
represented in bytes. This will be cleaned up in subsequent patches.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Andre Noll
2009-06-18 08:45:27 +10:00
committed by NeilBrown
parent 9d8f036362
commit 664e7c413f
4 changed files with 43 additions and 38 deletions

View File

@@ -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_sectors << 9 != mddev->new_chunk ||
if (mddev->chunk_sectors != mddev->new_chunk_sectors ||
mddev->layout != mddev->new_layout ||
mddev->level != mddev->new_level) {
mddev->new_chunk = mddev->chunk_sectors << 9;
mddev->new_chunk_sectors = mddev->chunk_sectors;
mddev->new_layout = mddev->layout;
mddev->new_level = mddev->level;
return -EINVAL;