]> granicus.if.org Git - zfs/commitdiff
Suppress AIO kmem warnings
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Oct 2014 00:10:45 +0000 (17:10 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 20 Oct 2014 23:10:25 +0000 (16:10 -0700)
The new zpl_aio_write() and zpl_aio_read() functions use kmem_alloc()
to allocate enough memory to hold the vectorized IO.  While this
allocation will be small it's been observed in practice to sometimes
slightly exceed the 8K warning threshold by a few kilobytes.
Therefore, the KM_NODEBUG flag has been added to suppress warning.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Closes #2774

module/zfs/zpl_file.c

index c72d5c9477397757cf1c8e22864ee1ee8a91fe87..cabe9bf15b2dc122ff9d50087e2c01ac6caa7a24 100644 (file)
@@ -248,7 +248,7 @@ zpl_aio_read(struct kiocb *kiocb, const struct iovec *iovp,
        size_t count = kiocb->ki_nbytes;
        ssize_t read;
        size_t alloc_size = sizeof (struct iovec) * nr_segs;
-       struct iovec *iov_tmp = kmem_alloc(alloc_size, KM_SLEEP);
+       struct iovec *iov_tmp = kmem_alloc(alloc_size, KM_SLEEP | KM_NODEBUG);
        bcopy(iovp, iov_tmp, alloc_size);
 
        ASSERT(iovp);
@@ -325,7 +325,7 @@ zpl_aio_write(struct kiocb *kiocb, const struct iovec *iovp,
        size_t count = kiocb->ki_nbytes;
        ssize_t wrote;
        size_t alloc_size = sizeof (struct iovec) * nr_segs;
-       struct iovec *iov_tmp = kmem_alloc(alloc_size, KM_SLEEP);
+       struct iovec *iov_tmp = kmem_alloc(alloc_size, KM_SLEEP | KM_NODEBUG);
        bcopy(iovp, iov_tmp, alloc_size);
 
        ASSERT(iovp);