aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-06-09 02:32:22 -0400
committerNeilBrown <neilb@suse.de>2009-06-09 02:32:22 -0400
commit0e6e0271a210817e202c8a4bfffbde3e3c0616d1 (patch)
tree0452e29d393b7688f09f38c98f113703d1b5cc3d /drivers/md
parenta8c906ca3f63d05f0d25490cf82276f73c6fe095 (diff)
md/raid5: fix bug in reshape code when chunk_size decreases.
Now that we support changing the chunksize, we calculate "reshape_sectors" to be the max of number of sectors in old and new chunk size. However there is one please where we still use 'chunksize' rather than 'reshape_sectors'. This causes a reshape that reduces the size of chunks to freeze. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 59f2ec0759b4..bb37fb1b2d82 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3916,7 +3916,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
3916 raid5_compute_sector(conf, stripe_addr*(new_data_disks), 3916 raid5_compute_sector(conf, stripe_addr*(new_data_disks),
3917 1, &dd_idx, NULL); 3917 1, &dd_idx, NULL);
3918 last_sector = 3918 last_sector =
3919 raid5_compute_sector(conf, ((stripe_addr+conf->chunk_size/512) 3919 raid5_compute_sector(conf, ((stripe_addr+reshape_sectors)
3920 *(new_data_disks) - 1), 3920 *(new_data_disks) - 1),
3921 1, &dd_idx, NULL); 3921 1, &dd_idx, NULL);
3922 if (last_sector >= mddev->dev_sectors) 3922 if (last_sector >= mddev->dev_sectors)