]> git.ipfire.org Git - people/ms/linux.git/commit - fs/nfsd/nfs4xdr.c
NFSD: Optimize nfsd4_encode_readv()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 22 Jul 2022 20:09:04 +0000 (16:09 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 30 Jul 2022 00:16:57 +0000 (20:16 -0400)
commit28d5bc468efe74b790e052f758ce083a5015c665
treede8222db92370ef1a0a5b91361136feea7b4ff98
parent24c7fb85498eda1d4c6b42cc4886328429814990
NFSD: Optimize nfsd4_encode_readv()

write_bytes_to_xdr_buf() is pretty expensive to use for inserting
an XDR data item that is always 1 XDR_UNIT at an address that is
always XDR word-aligned.

Since both the readv and splice read paths encode EOF and maxcount
values, move both to a common code path.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c