]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for ext_pgs mbufs to nfsrv_adj().
authorrmacklem <rmacklem@FreeBSD.org>
Sun, 26 Jul 2020 02:42:09 +0000 (02:42 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Sun, 26 Jul 2020 02:42:09 +0000 (02:42 +0000)
commit2fe61d962470c1da57dd9c627455e4f999f1b649
tree5400a1b3a9afbb0cb1bdadd68e4cb1ae7afe8e71
parent8d66daf2fc58287e91407ac609da7b760706575c
Add support for ext_pgs mbufs to nfsrv_adj().

This patch uses a slightly different algorithm for nfsrv_adj()
since ext_pgs mbuf lists are not permitted to have m_len == 0 mbufs.
As such, the code now frees mbufs after the adjustment in the list instead
of setting their m_len field to 0.
Since mbuf(s) may be trimmed off the tail of the list, the function now
returns a pointer to the last mbuf in the list.  This saves the caller
from needing to use m_last() to find the last mbuf.
It also implies that it might return a nul list, which required a check for
that in nfsrvd_readlink().

This is another in the series of commits that add support to the NFS client
and server for building RPC messages in ext_pgs mbufs with anonymous pages.
This is useful so that the entire mbuf list does not need to be
copied before calling sosend() when NFS over TLS is enabled.

Use of ext_pgs mbufs will not be enabled until the kernel RPC is updated
to handle TLS.
sys/fs/nfs/nfs_var.h
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdserv.c
sys/fs/nfsserver/nfs_nfsdsubs.c