]> granicus.if.org Git - zfs/commitdiff
Limit zfs_vdev_aggregation_limit to SPA_MAXBLOCKSIZE
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 15 Oct 2012 16:27:48 +0000 (09:27 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 15 Oct 2012 16:28:43 +0000 (09:28 -0700)
Prevent users from setting the zfs_vdev_aggregation_limit tuning
larger than SPA_MAXBLOCKSIZE.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #520

module/zfs/vdev_queue.c

index 7ba638952e10df8e52fcd4bb84e4583b8dd84df3..e2096fac9d63d70397468fbd85bfa8f5617ea98e 100644 (file)
@@ -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,