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
F171445467: D57005.diff
Fri, Sep 11, 4:13 AM
F171437055: D57005.id177846.diff
Fri, Sep 11, 3:23 AM
Unknown Object (File)
Thu, Sep 10, 11:23 AM
Unknown Object (File)
Tue, Sep 8, 1:08 AM
Unknown Object (File)
Sun, Sep 6, 11:45 AM
Unknown Object (File)
Sun, Sep 6, 6:14 AM
Unknown Object (File)
Sat, Sep 5, 10:03 PM
Unknown Object (File)
Sat, Sep 5, 6:59 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