RFC: Does allocuio() need the UIO_MAXIOV KASSERT?
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Mar 2026 20:41:34 UTC
Hi,
There has been a push in the NFSv4 world to support
I/O RPCs even larger than 1Mbyte, which is currently
the limit in FreeBSD.
But increasing this, there is a glitch..
ZFS calls cloneuio(), which calls allocuio() that
triggers this KASSERT().
KASSERT(iovcnt <= UIO_MAXIOV,
("Requested %u iovecs exceed UIO_MAXIOV", iovcnt));
For a large write RPC, the server handles a list of
mbuf clusters as the iov. A 4Mbyte write will be in more
than 2K clusters.
Note that copyinuio() and copyoutuio() check for the
length exceeding UIO_MAXIOV, so I don't see any
reason for allocuio() needing this KASSERT()?
Can I get rid of it? rick