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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user