aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_queue.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-10-15 09:27:48 -0700
committerBrian Behlendorf <[email protected]>2012-10-15 09:28:43 -0700
commitc418410393325eb01be5b6cc5ff0e6e8aa24af93 (patch)
treeba86c23f4d70aaa586c33d1d756d4ee24767b85a /module/zfs/vdev_queue.c
parent45ca2d91cb14bcbe7a06eea6e6d24ae71f1c54bf (diff)
Limit zfs_vdev_aggregation_limit to SPA_MAXBLOCKSIZE
Prevent users from setting the zfs_vdev_aggregation_limit tuning larger than SPA_MAXBLOCKSIZE. Signed-off-by: Brian Behlendorf <[email protected]> Closes #520
Diffstat (limited to 'module/zfs/vdev_queue.c')
-rw-r--r--module/zfs/vdev_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/vdev_queue.c b/module/zfs/vdev_queue.c
index 7ba638952..e2096fac9 100644
--- a/module/zfs/vdev_queue.c
+++ b/module/zfs/vdev_queue.c
@@ -201,7 +201,7 @@ vdev_queue_io_to_issue(vdev_queue_t *vq, uint64_t pending_limit)
avl_tree_t *t;
vdev_io_t *vi;
int flags;
- uint64_t maxspan = zfs_vdev_aggregation_limit;
+ uint64_t maxspan = MIN(zfs_vdev_aggregation_limit, SPA_MAXBLOCKSIZE);
uint64_t maxgap;
int stretch;
@@ -312,7 +312,7 @@ again:
if (fio != lio) {
uint64_t size = IO_SPAN(fio, lio);
- ASSERT(size <= zfs_vdev_aggregation_limit);
+ ASSERT(size <= maxspan);
ASSERT(vi != NULL);
aio = zio_vdev_delegated_io(fio->io_vd, fio->io_offset,