diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-10-22 19:46:58 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-03-22 10:18:56 -0400 |
commit | 7f87fc2d34d475225e78b7f5c4eabb121f4282b2 (patch) | |
tree | a21c1e2521cc016660e764475085ea9ff7acb7cc /scripts | |
parent | NFSD: Update the NFSv3 READDIR3res encoder to use struct xdr_stream (diff) | |
download | linux-dev-7f87fc2d34d475225e78b7f5c4eabb121f4282b2.tar.xz linux-dev-7f87fc2d34d475225e78b7f5c4eabb121f4282b2.zip |
NFSD: Update NFSv3 READDIR entry encoders to use struct xdr_stream
The benefit of the xdr_stream helpers is that they transparently
handle encoding an XDR data item that crosses page boundaries.
Most of the open-coded logic to do that here can be eliminated.
A sub-buffer and sub-stream are set up as a sink buffer for the
directory entry encoder. As an entry is encoded, it is added to
the end of the content in this buffer/stream. The total length of
the directory list is tracked in the buffer's @len field.
When it comes time to encode the Reply, the sub-buffer is merged
into rq_res's page array at the correct place using
xdr_write_pages().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions