summaryrefslogtreecommitdiffstats
path: root/module/zfs/zvol.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2015-03-23 12:10:19 -0500
committerBrian Behlendorf <[email protected]>2015-03-25 11:58:42 -0700
commitded576e28fe70a40e78a90e4668de8130d599380 (patch)
tree394908a0734f2059cc396796657771ecd8836458 /module/zfs/zvol.c
parent7b4536c710adea88f160c6f9ae140ae5279c8183 (diff)
Set the maximum ZVOL transfer size correctly
ZoL had been setting max_sectors to UINT_MAX, but until Linux 3.19, it the kernel artifically capped it at 1024 (BLK_DEF_MAX_SECTORS). This cap was removed in torvalds/linux@34b48db. This patch changes it to DMU_MAX_ACCESS (in sectors) and also changes the ASSERT in dmu_tx_hold_write() to allow the maximum transfer size. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3212
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r--module/zfs/zvol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index 4febbb6bf..d180b5b5b 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1389,7 +1389,7 @@ __zvol_create_minor(const char *name, boolean_t ignore_snapdev)
set_capacity(zv->zv_disk, zv->zv_volsize >> 9);
- blk_queue_max_hw_sectors(zv->zv_queue, UINT_MAX);
+ blk_queue_max_hw_sectors(zv->zv_queue, DMU_MAX_ACCESS / 512);
blk_queue_max_segments(zv->zv_queue, UINT16_MAX);
blk_queue_max_segment_size(zv->zv_queue, UINT_MAX);
blk_queue_physical_block_size(zv->zv_queue, zv->zv_volblocksize);