diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-07-16 02:38:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:39 -0400 |
commit | 8619b86f20588c020b280e6f67a9b8712b1ee38a (patch) | |
tree | fb4c1d31ba40eb6b380fdf0fe956848edf93760f /arch | |
parent | e8234483e7545b3cd298b0265fcee2e4a14c9f51 (diff) |
uml: limit request size on COWed devices
COWed devices can't handle more than 32 (64 on x86_64) sectors in one request
due to the size of the bitmap being carried around in the io_thread_req.
Enforce that by telling the block layer not to put too many sectors in
requests to COWed devices.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 0947f2e20045..fc27f6c72b41 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -712,6 +712,8 @@ static int ubd_add(int n, char **error_out) | |||
712 | ubd_dev->queue->queuedata = ubd_dev; | 712 | ubd_dev->queue->queuedata = ubd_dev; |
713 | 713 | ||
714 | blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); | 714 | blk_queue_max_hw_segments(ubd_dev->queue, MAX_SG); |
715 | if(ubd_dev->cow.file != NULL) | ||
716 | blk_queue_max_sectors(ubd_dev->queue, 8 * sizeof(long)); | ||
715 | err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); | 717 | err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); |
716 | if(err){ | 718 | if(err){ |
717 | *error_out = "Failed to register device"; | 719 | *error_out = "Failed to register device"; |