summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorJohann Latocha2012-03-06 19:27:21 +0100
committerJohann Latocha2012-03-06 19:27:21 +0100
commit7358f2786564e9a9960779e23ae36a26313f9bf3 (patch)
treebd18bcddbcd4dccc51631ebcb8e706627392e2ce /src/kernel
parent[SERVER] Support device files as input (diff)
downloaddnbd3-7358f2786564e9a9960779e23ae36a26313f9bf3.tar.gz
dnbd3-7358f2786564e9a9960779e23ae36a26313f9bf3.tar.xz
dnbd3-7358f2786564e9a9960779e23ae36a26313f9bf3.zip
[SERVER] Cache images on hdd
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/blk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/blk.c b/src/kernel/blk.c
index 2b12b74..b975600 100644
--- a/src/kernel/blk.c
+++ b/src/kernel/blk.c
@@ -73,6 +73,10 @@ int dnbd3_blk_add_device(dnbd3_device_t *dev, int minor)
blk_queue_logical_block_size(blk_queue, DNBD3_BLOCK_SIZE);
blk_queue_physical_block_size(blk_queue, DNBD3_BLOCK_SIZE);
+ blk_queue_max_hw_sectors(blk_queue, DNBD3_BLOCK_SIZE/KERNEL_SECTOR_SIZE);
+ blk_queue_max_segment_size(blk_queue, DNBD3_BLOCK_SIZE);
+ blk_queue_max_segments(blk_queue, 1);
+
disk->queue = blk_queue;
disk->private_data = dev;
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, disk->queue);