Page MenuHomeFreeBSD

subr_uio.c: Remove a KASSERT() to allow large NFS server I/O
ClosedPublic

Authored by rmacklem on May 14 2026, 8:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 19, 6:43 PM
Unknown Object (File)
Wed, Jun 17, 8:30 PM
Unknown Object (File)
Wed, Jun 17, 7:54 PM
Unknown Object (File)
Wed, Jun 10, 5:33 AM
Unknown Object (File)
Mon, Jun 8, 5:11 PM
Unknown Object (File)
Thu, Jun 4, 11:19 PM
Unknown Object (File)
Thu, Jun 4, 11:16 PM
Unknown Object (File)
Thu, Jun 4, 4:33 PM
Subscribers

Details

Summary

When the NFS server is set to allow an I/O size greater
than 1Mbyte (not allowed in FreeBSD's main yet), a
KASSERT() in allocuio() can fail when:
zfs_freebsd_write()->zfs_write()->zfs_uiocopy()->cloneuio()
->allocuio()
is called for a large NFS server write.

Since the userland API callers to allocuio() already
check that the size does not exceed UIO_MAXIOV,
there does not seem to be a need to a KASSERT()
here.

Removing the KASSERT() allows NFS server writes
of greater than 1Mbyte to work, once the NFS code
is patched to allow them.

Test Plan

Tested with a NFS server patched to allow greater
than 1Mbyte I/O sizes for both UFS and ZFS
exported file systems, although only ZFS calls
allocuio().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable