diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2003-08-30 22:43:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-08-30 22:43:58 -0700 |
| commit | f556ef000efc90a45a285f4f0b4fd70bb70fa952 (patch) | |
| tree | 8550f864ad678321fc24f913e510fb8d7248e7ec | |
| parent | cff9b7ddae05e2c281944f980ef56a75c98531ca (diff) | |
[PATCH] Set max_sectors for raid0 only, not for all raid levels.
raid1 and multipath have not concept of a chunksize, so basing
max_sectors on it is obviously wrong.
Similary 'linear' has a very different concept of chunksize and
max_sectors doesn't apply.
raid5 does have relevant chunk_size concept, but it has code to
effectively handle any chunksize.
So we only need to set max_sectors based on chunk_size in raid0.
| -rw-r--r-- | drivers/md/md.c | 6 | ||||
| -rw-r--r-- | drivers/md/raid0.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index cee67e74ecba..8c2df2953cbb 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1610,12 +1610,6 @@ static int do_md_run(mddev_t * mddev) spin_unlock(&pers_lock); blk_queue_make_request(mddev->queue, mddev->pers->make_request); - printk("%s: setting max_sectors to %d, segment boundary to %d\n", - disk->disk_name, - chunk_size >> 9, - (chunk_size>>1)-1); - blk_queue_max_sectors(mddev->queue, chunk_size >> 9); - blk_queue_segment_boundary(mddev->queue, (chunk_size>>1) - 1); mddev->queue->queuedata = mddev; err = mddev->pers->run(mddev); diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 26b23d06e3d5..eb4368751307 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -231,6 +231,13 @@ static int raid0_run (mddev_t *mddev) mdk_rdev_t *rdev; struct list_head *tmp; + printk("md%d: setting max_sectors to %d, segment boundary to %d\n", + mdidx(mddev), + mddev->chunk_size >> 9, + (mddev->chunk_size>>1)-1); + blk_queue_max_sectors(mddev->queue, mddev->chunk_size >> 9); + blk_queue_segment_boundary(mddev->queue, (mddev->chunk_size>>1) - 1); + conf = kmalloc(sizeof (raid0_conf_t), GFP_KERNEL); if (!conf) goto out; |
