summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
Commit message (Collapse)AuthorAgeFilesLines
...
* | NFSD: Replace READ* macros in nfsd4_decode_write()Chuck Lever2020-11-301-10/+11
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_verify()Chuck Lever2020-11-301-8/+15
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()Chuck Lever2020-11-301-6/+5
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_setclientid()Chuck Lever2020-11-301-16/+31
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_setattr()Chuck Lever2020-11-301-1/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_secinfo()Chuck Lever2020-11-301-10/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_renew()Chuck Lever2020-11-301-9/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_rename()Chuck Lever2020-11-301-14/+4
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_remove()Chuck Lever2020-11-301-10/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_readdir()Chuck Lever2020-11-301-9/+14
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_read()Chuck Lever2020-11-301-6/+7
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_putfh()Chuck Lever2020-11-301-7/+12
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()Chuck Lever2020-11-301-9/+7
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_open_confirm()Chuck Lever2020-11-301-5/+5
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_open()Chuck Lever2020-11-301-14/+10
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helper to decode OPEN's open_claim4 argumentChuck Lever2020-11-303-50/+56
| | | | | | | | | | | | | | | | | | | | Refactor for clarity. Note that op_fname is the only instance of an NFSv4 filename stored in a struct xdr_netobj. Convert it to a u32/char * pair so that the new nfsd4_decode_filename() helper can be used. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_share_deny()Chuck Lever2020-11-301-7/+4
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_share_access()Chuck Lever2020-11-301-4/+2
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helper to decode OPEN's openflag4 argumentChuck Lever2020-11-301-13/+25
| | | | | | | | | | | | Refactor for clarity. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helper to decode OPEN's createhow4 argumentChuck Lever2020-11-301-33/+45
| | | | | | | | | | | | Refactor for clarity. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helper to decode NFSv4 verifiersChuck Lever2020-11-301-4/+18
| | | | | | | | | | | | | | This helper will be used to simplify decoders in subsequent patches. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_lookup()Chuck Lever2020-11-301-10/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_locku()Chuck Lever2020-11-301-10/+12
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_lockt()Chuck Lever2020-11-301-14/+10
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_lock()Chuck Lever2020-11-301-14/+10
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helper for decoding locker4Chuck Lever2020-11-301-21/+43
| | | | | | | | | | | | Refactor for clarity. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add helpers to decode a clientid4 and an NFSv4 state ownerChuck Lever2020-11-301-5/+29
| | | | | | | | | | | | These helpers will also be used to simplify decoders in subsequent patches. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Relocate nfsd4_decode_opaque()Chuck Lever2020-11-301-16/+27
| | | | | | | | | | | | | | Enable nfsd4_decode_opaque() to be used in more decoders, and replace the READ* macros in nfsd4_decode_opaque(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_link()Chuck Lever2020-11-301-10/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_getattr()Chuck Lever2020-11-301-1/+2
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_delegreturn()Chuck Lever2020-11-301-1/+1
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_create()Chuck Lever2020-11-301-18/+40
| | | | | | | | | | | | | | A dedicated decoder for component4 is introduced here, which will be used by other operation decoders in subsequent patches. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_fattr()Chuck Lever2020-11-301-18/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's be more careful to avoid overrunning the memory that backs the bitmap array. This requires updating the synopsis of nfsd4_decode_fattr(). Bruce points out that a server needs to be careful to return nfs_ok when a client presents bitmap bits the server doesn't support. This includes bits in bitmap words the server might not yet support. The current READ* based implementation is good about that, but that requirement hasn't been documented. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 umask attributeChuck Lever2020-11-301-7/+9
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 security label attributeChuck Lever2020-11-301-16/+30
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 time_set attributesChuck Lever2020-11-301-10/+29
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 owner_group attributeChuck Lever2020-11-301-5/+10
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 owner attributeChuck Lever2020-11-301-5/+10
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 mode attributeChuck Lever2020-11-301-2/+5
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 acl attributeChuck Lever2020-11-301-40/+67
| | | | | | | | | | | | Refactor for clarity and to move infrequently-used code out of line. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros that decode the fattr4 size attributeChuck Lever2020-11-301-2/+5
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Change the way the expected length of a fattr4 is checkedChuck Lever2020-11-301-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | Because the fattr4 is now managed in an xdr_stream, all that is needed is to store the initial position of the stream before decoding the attribute list. Then the actual length of the list is computed using the final stream position, after decoding is complete. No behavior change is expected. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_commit()Chuck Lever2020-11-301-7/+5
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_close()Chuck Lever2020-11-301-7/+16
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace READ* macros in nfsd4_decode_access()Chuck Lever2020-11-301-11/+13
| | | | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Replace the internals of the READ_BUF() macroChuck Lever2020-11-303-165/+30
| | | | | | | | | | | | | | | | | | | | Convert the READ_BUF macro in nfs4xdr.c from open code to instead use the new xdr_stream-style decoders already in use by the encode side (and by the in-kernel NFS client implementation). Once this conversion is done, each individual NFSv4 argument decoder can be independently cleaned up to replace these macros with C code. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add tracepoints in nfsd4_decode/encode_compound()Chuck Lever2020-11-302-2/+79
| | | | | | | | | | | | | | | | | | | | For troubleshooting purposes, record failures to decode NFSv4 operation arguments and encode operation results. trace_nfsd_compound_decode_err() replaces the dprintk() call sites that are embedded in READ_* macros that are about to be removed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add tracepoints in nfsd_dispatch()Chuck Lever2020-11-302-12/+65
| | | | | | | | | | | | | | For troubleshooting purposes, record GARBAGE_ARGS and CANT_ENCODE failures. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | NFSD: Add common helpers to decode void args and encode void resultsChuck Lever2020-11-3013-86/+64
| | | | | | | | | | | | | | Start off the conversion to xdr_stream by de-duplicating the functions that decode void arguments and encode void results. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* | SUNRPC: Prepare for xdr_stream-style decoding on the server-sideChuck Lever2020-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A "permanent" struct xdr_stream is allocated in struct svc_rqst so that it is usable by all server-side decoders. A per-rqst scratch buffer is also allocated to handle decoding XDR data items that cross page boundaries. To demonstrate how it will be used, add the first call site for the new svcxdr_init_decode() API. As an additional part of the overall conversion, add symbolic constants for successful and failed XDR operations. Returning "0" is overloaded. Sometimes it means something failed, but sometimes it means success. To make it more clear when XDR decoding functions succeed or fail, introduce symbolic constants. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>