Commit graph

3345 commits

Author SHA1 Message Date
Gustavo A. R. Silva
e6c61d5d44 UAPI: nfsfh.h: Replace one-element array with flexible-array member
[ Upstream commit c0a744dcaa29e9537e8607ae9c965ad936124a4d ]

There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Use an anonymous union with a couple of anonymous structs in order to
keep userspace unchanged:

$ pahole -C nfs_fhbase_new fs/nfsd/nfsfh.o
struct nfs_fhbase_new {
        union {
                struct {
                        __u8       fb_version_aux;       /*     0     1 */
                        __u8       fb_auth_type_aux;     /*     1     1 */
                        __u8       fb_fsid_type_aux;     /*     2     1 */
                        __u8       fb_fileid_type_aux;   /*     3     1 */
                        __u32      fb_auth[1];           /*     4     4 */
                };                                       /*     0     8 */
                struct {
                        __u8       fb_version;           /*     0     1 */
                        __u8       fb_auth_type;         /*     1     1 */
                        __u8       fb_fsid_type;         /*     2     1 */
                        __u8       fb_fileid_type;       /*     3     1 */
                        __u32      fb_auth_flex[0];      /*     4     0 */
                };                                       /*     0     4 */
        };                                               /*     0     8 */

        /* size: 8, cachelines: 1, members: 1 */
        /* last cacheline: 8 bytes */
};

Also, this helps with the ongoing efforts to enable -Warray-bounds by
fixing the following warnings:

fs/nfsd/nfsfh.c: In function ‘nfsd_set_fh_dentry’:
fs/nfsd/nfsfh.c:191:41: warning: array subscript 1 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
  191 |        ntohl((__force __be32)fh->fh_fsid[1])));
      |                              ~~~~~~~~~~~^~~
./include/linux/kdev_t.h:12:46: note: in definition of macro ‘MKDEV’
   12 | #define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
      |                                              ^~
./include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro ‘__swab32’
   40 | #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
      |                          ^~~~~~~~
./include/linux/byteorder/generic.h:136:21: note: in expansion of macro ‘__be32_to_cpu’
  136 | #define ___ntohl(x) __be32_to_cpu(x)
      |                     ^~~~~~~~~~~~~
./include/linux/byteorder/generic.h:140:18: note: in expansion of macro ‘___ntohl’
  140 | #define ntohl(x) ___ntohl(x)
      |                  ^~~~~~~~
fs/nfsd/nfsfh.c:191:8: note: in expansion of macro ‘ntohl’
  191 |        ntohl((__force __be32)fh->fh_fsid[1])));
      |        ^~~~~
fs/nfsd/nfsfh.c:192:32: warning: array subscript 2 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
  192 |    fh->fh_fsid[1] = fh->fh_fsid[2];
      |                     ~~~~~~~~~~~^~~
fs/nfsd/nfsfh.c:192:15: warning: array subscript 1 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
  192 |    fh->fh_fsid[1] = fh->fh_fsid[2];
      |    ~~~~~~~~~~~^~~

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
Chuck Lever
aa29daf2f0 SUNRPC: Export svc_xprt_received()
[ Upstream commit 7dcfbd86adc45f6d6b37278efd22530cf80ab474 ]

Prepare svc_xprt_received() to be called from transport code instead
of from generic RPC server code.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
NeilBrown
c84c0d4e8d nfsd: report client confirmation status in "info" file
[ Upstream commit 472d155a0631bd1a09b5c0c275a254e65605d683 ]

mountd can now monitor clients appearing and disappearing in
/proc/fs/nfsd/clients, and will log these events, in liu of the logging
of mount/unmount events for NFSv3.

Currently it cannot distinguish between unconfirmed clients (which might
be transient and totally uninteresting) and confirmed clients.

So add a "status: " line which reports either "confirmed" or
"unconfirmed", and use fsnotify to report that the info file
has been modified.

This requires a bit of infrastructure to keep the dentry for the "info"
file.  There is no need to take a counted reference as the dentry must
remain around until the client is removed.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
J. Bruce Fields
5b40b3fc09 nfsd: don't ignore high bits of copy count
[ Upstream commit e7a833e9cc6c3b58fe94f049d2b40943cba07086 ]

Note size_t is 32-bit on a 32-bit architecture, but cp_count is defined
by the protocol to be 64 bit, so we could be turning a large copy into a
0-length copy here.

Reported-by: <radchenkoy@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
J. Bruce Fields
2bc99cdbd9 nfsd: COPY with length 0 should copy to end of file
[ Upstream commit 792a5112aa90e59c048b601c6382fe3498d75db7 ]

>From https://tools.ietf.org/html/rfc7862#page-65

	A count of 0 (zero) requests that all bytes from ca_src_offset
	through EOF be copied to the destination.

Reported-by: <radchenkoy@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
Ricardo Ribalda
adf8263917 nfsd: Fix typo "accesible"
[ Upstream commit 34a624931b8c12b435b5009edc5897e4630107bc ]

Trivial fix.

Cc: linux-nfs@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
Paul Menzel
b606de1468 nfsd: Log client tracking type log message as info instead of warning
[ Upstream commit f988a7b71d1e66e63f79cd59c763875347943a7a ]

`printk()`, by default, uses the log level warning, which leaves the
user reading

    NFSD: Using UMH upcall client tracking operations.

wondering what to do about it (`dmesg --level=warn`).

Several client tracking methods are tried, and expected to fail. That’s
why a message is printed only on success. It might be interesting for
users to know the chosen method, so use info-level instead of
debug-level.

Cc: linux-nfs@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
J. Bruce Fields
531e8745c3 nfsd: helper for laundromat expiry calculations
[ Upstream commit 7f7e7a4006f74b031718055a0751c70c2e3d5e7e ]

We do this same logic repeatedly, and it's easy to get the sense of the
comparison wrong.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
Chuck Lever
4309c8c5e5 NFSD: Clean up NFSDDBG_FACILITY macro
[ Upstream commit 219a170502b3d597c52eeec088aee8fbf7b90da5 ]

These are no longer needed because there are no dprintk() call sites
in these files.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:36 +01:00
Chuck Lever
ecba77397a NFSD: Add a tracepoint to record directory entry encoding
[ Upstream commit 6019ce0742ca55d3e45279a19b07d1542747a098 ]

Enable watching the progress of directory encoding to capture the
timing of any issues with reading or encoding a directory. The
new tracepoint captures dirent encoding for all NFS versions.

For example, here's what a few NFSv4 directory entries might look
like:

nfsd-989   [002]   468.596265: nfsd_dirent:          fh_hash=0x5d162594 ino=2 name=.
nfsd-989   [002]   468.596267: nfsd_dirent:          fh_hash=0x5d162594 ino=1 name=..
nfsd-989   [002]   468.596299: nfsd_dirent:          fh_hash=0x5d162594 ino=3827 name=zlib.c
nfsd-989   [002]   468.596325: nfsd_dirent:          fh_hash=0x5d162594 ino=3811 name=xdiff
nfsd-989   [002]   468.596351: nfsd_dirent:          fh_hash=0x5d162594 ino=3810 name=xdiff-interface.h
nfsd-989   [002]   468.596377: nfsd_dirent:          fh_hash=0x5d162594 ino=3809 name=xdiff-interface.c

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
59ad394efc NFSD: Clean up after updating NFSv3 ACL encoders
[ Upstream commit 1416f435303d81070c6bcf5a4a9b4ed0f7a9f013 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
6c8dee4259 NFSD: Update the NFSv3 SETACL result encoder to use struct xdr_stream
[ Upstream commit 15e432bf0cfd1e6aebfa9ffd4e0cc2ff4f3ae2db ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
1c7e927146 NFSD: Update the NFSv3 GETACL result encoder to use struct xdr_stream
[ Upstream commit 20798dfe249a01ad1b12eec7dbc572db5003244a ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
b638ee45ac NFSD: Clean up after updating NFSv2 ACL encoders
[ Upstream commit 83d0b84572775a29f800de67a1b9b642a5376bc3 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
09208e9832 NFSD: Update the NFSv2 ACL ACCESS result encoder to use struct xdr_stream
[ Upstream commit 07f5c2963c04b11603e9667f89bb430c132e9cc1 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
2409a1fbd9 NFSD: Update the NFSv2 ACL GETATTR result encoder to use struct xdr_stream
[ Upstream commit 8d2009a10b3abaa12a39deb4876b215714993fe8 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
506998455c NFSD: Update the NFSv2 SETACL result encoder to use struct xdr_stream
[ Upstream commit 778f068fa0c0846b650ebdb8795fd51b5badc332 ]

The SETACL result encoder is exactly the same as the NFSv2
attrstatres decoder.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
1f70d81dcf NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream
[ Upstream commit f8cba47344f794b54373189bec23195b51020faf ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
0f0bcc88af NFSD: Add an xdr_stream-based encoder for NFSv2/3 ACLs
[ Upstream commit 8edc0648880a151026fe625fa1b76772b5766f68 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
b6b773d33f NFSD: Remove unused NFSv2 directory entry encoders
[ Upstream commit 8a2cf9f5709cc20a1114a7d22655928314fc86f8 ]

Clean up.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
c750724716 NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
[ Upstream commit f5dcccd647da513a89f3b6ca392b0c1eb050b9fc ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
6c4d316ef4 NFSD: Update the NFSv2 READDIR result encoder to use struct xdr_stream
[ Upstream commit 94c8f8c682a6497af7ea71351b18f637c6337d42 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
adec3bc3b2 NFSD: Count bytes instead of pages in the NFSv2 READDIR encoder
[ Upstream commit 8141d6a2bb6c655ff0c0b81ced80d9025f03e926 ]

Clean up: Counting the bytes used by each returned directory entry
seems less brittle to me than trying to measure consumed pages after
the fact.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
027123af6d NFSD: Add a helper that encodes NFSv3 directory offset cookies
[ Upstream commit d52532002ffa217ad3fa4c3ba86c95203d21dd21 ]

Refactor: Add helper function similar to nfs3svc_encode_cookie3().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:35 +01:00
Chuck Lever
0379d2419a NFSD: Update the NFSv2 STATFS result encoder to use struct xdr_stream
[ Upstream commit bf15229f2ced4f14946eef958336f764e30f8efb ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
9b4dc4f022 NFSD: Update the NFSv2 READ result encoder to use struct xdr_stream
[ Upstream commit a6f8d9dc9e44b51303d9abde4643460137d19b28 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
12000cd126 NFSD: Update the NFSv2 READLINK result encoder to use struct xdr_stream
[ Upstream commit d9014b0f8fae11f22a3d356553844e06ddcdce4a ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
6b2ab70994 NFSD: Update the NFSv2 diropres encoder to use struct xdr_stream
[ Upstream commit e3b4ef221ac57c08341c97a10c8a81c041f76716 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
991b778b3a NFSD: Update the NFSv2 attrstat encoder to use struct xdr_stream
[ Upstream commit 92b54a4fa4224e6116eb0d87a39dd05af23fcdfa ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
9e9a3adf4a NFSD: Update the NFSv2 stat encoder to use struct xdr_stream
[ Upstream commit a887eaed2a964754334cd3f8c5fe87e413e68fef ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
bf746ce977 NFSD: Reduce svc_rqst::rq_pages churn during READDIR operations
[ Upstream commit 76ed0dd96eeb2771b21bf5dcbd88326ef89ee0ed ]

During NFSv2 and NFSv3 READDIR/PLUS operations, NFSD advances
rq_next_page to the full size of the client-requested buffer, then
releases all those pages at the end of the request. The next request
to use that nfsd thread has to refill the pages.

NFSD does this even when the dirlist in the reply is small. With
NFSv3 clients that send READDIR operations with large buffer sizes,
that can be 256 put_page/alloc_page pairs per READDIR request, even
though those pages often remain unused.

We can save some work by not releasing dirlist buffer pages that
were not used to form the READDIR Reply. I've left the NFSv2 code
alone since there are never more than three pages involved in an
NFSv2 READDIR Reply.

Eventually we should nail down why these pages need to be released
at all in order to avoid allocating and releasing pages
unnecessarily.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
2415336d32 NFSD: Remove unused NFSv3 directory entry encoders
[ Upstream commit 1411934627f9fe31a36ac8c43179ce9b63edce5c ]

Clean up.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
c6fa35a441 NFSD: Update NFSv3 READDIR entry encoders to use struct xdr_stream
[ Upstream commit 7f87fc2d34d475225e78b7f5c4eabb121f4282b2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
ebd915cf85 NFSD: Update the NFSv3 READDIR3res encoder to use struct xdr_stream
[ Upstream commit e4ccfe3014de435984939a3d84b7f241d3b57b0d ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
1cf0ab7219 NFSD: Count bytes instead of pages in the NFSv3 READDIR encoder
[ Upstream commit a1409e2de4f11034c8eb30775cc3e37039a4ef13 ]

Clean up: Counting the bytes used by each returned directory entry
seems less brittle to me than trying to measure consumed pages after
the fact.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
74e82961ae NFSD: Add a helper that encodes NFSv3 directory offset cookies
[ Upstream commit a161e6c76aeba835e475a2f27dbbe5c37e565e94 ]

Refactor: De-duplicate identical code that handles encoding of
directory offset cookies across page boundaries.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
70b33c5fdb NFSD: Update the NFSv3 COMMIT3res encoder to use struct xdr_stream
[ Upstream commit 5ef2826c761079e27904c85034df34e601b82d94 ]

As an additional clean up, encode_wcc_data() is removed because it
is now no longer used.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
5d797a7434 NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream
[ Upstream commit ded04a587f6ceaaba3caefad4021f2212b46c9ff ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
c730c58c76 NFSD: Update the NFSv3 FSINFO3res encoder to use struct xdr_stream
[ Upstream commit 0a139d1b7f327010acc36e8162936d3108c7addb ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
791921849b NFSD: Update the NFSv3 FSSTAT3res encoder to use struct xdr_stream
[ Upstream commit 8b7044984fd6eeadf72285e3617116bd15e9e676 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
f73ea84fca NFSD: Update the NFSv3 LINK3res encoder to use struct xdr_stream
[ Upstream commit 4d74380a446f75eebb2171687d9b8baf0025bdf1 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:34 +01:00
Chuck Lever
5cd3abdfee NFSD: Update the NFSv3 RENAMEv3res encoder to use struct xdr_stream
[ Upstream commit 89d79e9672dfa6d0cc416699c16f2d312da58ff2 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
2f31aa3e49 NFSD: Update the NFSv3 CREATE family of encoders to use struct xdr_stream
[ Upstream commit 78315b36781d259dcbdc102ff22c3f2f25712223 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
071f3e7c61 NFSD: Update the NFSv3 WRITE3res encoder to use struct xdr_stream
[ Upstream commit ecb7a085ac15a8844ebf12fca6ae51ce71ac9b3b ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
5a2a508148 NFSD: Update the NFSv3 READ3res encode to use struct xdr_stream
[ Upstream commit cc9bcdad7773c295375e66c892c7ac00524706f2 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
73f907895f NFSD: Update the NFSv3 READLINK3res encoder to use struct xdr_stream
[ Upstream commit 9a9c8923b3efd593d0e6a405efef9d58c6e6804b ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
5b10023828 NFSD: Update the NFSv3 wccstat result encoder to use struct xdr_stream
[ Upstream commit 70f8e839859a994e324e1d18889f8319bbd5bff9 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
68eefaa8dd NFSD: Update the NFSv3 LOOKUP3res encoder to use struct xdr_stream
[ Upstream commit 5cf353354af1a385f29dec4609a1532d32c83a25 ]

Also, clean up: Rename the encoder function to match the name of
the result structure in RFC 1813, consistent with other encoder
function names in nfs3xdr.c. "diropres" is an NFSv2 thingie.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
ed2796887b NFSD: Update the NFSv3 ACCESS3res encoder to use struct xdr_stream
[ Upstream commit 907c38227fb57f5c537491ca76dd0b9636029393 ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00
Chuck Lever
36318a0ed9 NFSD: Update the GETATTR3res encoder to use struct xdr_stream
[ Upstream commit 2c42f804d30f6a8d86665eca84071b316821ea08 ]

As an additional clean up, some renaming is done to more closely
reflect the data type and variable names used in the NFSv3 XDR
definition provided in RFC 1813. "attrstat" is an NFSv2 thingie.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:33 +01:00