Chuck Lever
ae3ea82492
NFSD: Replace READ* macros in nfsd4_decode_cb_sec()
...
[ Upstream commit 1a99440807bfc66597aaa2e0f0213c319b023e34 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:24 +01:00
Chuck Lever
783093b206
NFSD: Replace READ* macros in nfsd4_decode_release_lockowner()
...
[ Upstream commit a4a80c15ca4dd998ab5cbe87bd856c626a318a80 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:24 +01:00
Chuck Lever
844e52898c
NFSD: Replace READ* macros in nfsd4_decode_write()
...
[ Upstream commit 244e2befcba80f42c65293b6c56282bb78f9f417 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
2e01ced2a4
NFSD: Replace READ* macros in nfsd4_decode_verify()
...
[ Upstream commit 67cd453eeda86be90f83a0f4798f33832cf2d98c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
b2b8186a6c
NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm()
...
[ Upstream commit d1ca55149d67e5896f89a30053f5d83c002ac10e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
34132fb635
NFSD: Replace READ* macros in nfsd4_decode_setclientid()
...
[ Upstream commit 92fa6c08c251d52d0d7b46066ecf87b96a0c4b8f ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
24f75d3d2a
NFSD: Replace READ* macros in nfsd4_decode_setattr()
...
[ Upstream commit 44592fe9479d8d4b88594365ab825f7b07afdf7c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
a9fde57f85
NFSD: Replace READ* macros in nfsd4_decode_secinfo()
...
[ Upstream commit d0abdae5191a916d767164f6fc6c0e2e814a20a7 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
4e3cc691f3
NFSD: Replace READ* macros in nfsd4_decode_renew()
...
[ Upstream commit d12f90458dc8c11734ba44ec88f109bf8de86ff0 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
b240d33402
NFSD: Replace READ* macros in nfsd4_decode_rename()
...
[ Upstream commit ba881a0a5342b3aaf83958901ebe3fe752eaab46 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
28de5567a6
NFSD: Replace READ* macros in nfsd4_decode_remove()
...
[ Upstream commit b7f5fbf219aecda98e32de305551e445f9438899 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
d13a153e28
NFSD: Replace READ* macros in nfsd4_decode_readdir()
...
[ Upstream commit 0dfaf2a371436860ace6af889e6cd8410ee63164 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
3de83d8c6c
NFSD: Replace READ* macros in nfsd4_decode_read()
...
[ Upstream commit 3909c3bc604688503e31ddceb429dc156c4720c1 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
e1de828f20
NFSD: Replace READ* macros in nfsd4_decode_putfh()
...
[ Upstream commit a73bed98413b1d9eb4466f776a56d2fde8b3b2c9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
0ff3b1afe5
NFSD: Replace READ* macros in nfsd4_decode_open_downgrade()
...
[ Upstream commit dca71651f097ea608945d7a66bf62761a630de9a ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
43e2862be3
NFSD: Replace READ* macros in nfsd4_decode_open_confirm()
...
[ Upstream commit 06bee693a1f1cb774b91000f05a6e183c257d8e9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
b53ba0c2da
NFSD: Replace READ* macros in nfsd4_decode_open()
...
[ Upstream commit 61e5e0b3ec713d1365008c8af3fe5fdd262e2a60 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:23 +01:00
Chuck Lever
e14618a197
NFSD: Add helper to decode OPEN's open_claim4 argument
...
[ Upstream commit 1708e50b0145f393acbec9e319bdf0e33f765d25 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
1485000120
NFSD: Replace READ* macros in nfsd4_decode_share_deny()
...
[ Upstream commit b07bebd9eb9842e2d0dea87efeb92884556e55b0 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
53534bedf3
NFSD: Replace READ* macros in nfsd4_decode_share_access()
...
[ Upstream commit 9aa62f5199749b274454b6d7d914c9b2a5e77031 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
e96a9ec762
NFSD: Add helper to decode OPEN's openflag4 argument
...
[ Upstream commit e6ec04b27bfb4869c0e35fbcf24333d379f101d5 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
c6511e947e
NFSD: Add helper to decode OPEN's createhow4 argument
...
[ Upstream commit bf33bab3c4182cdd795983f14de5606e82fab377 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
4cb9382c5f
NFSD: Add helper to decode NFSv4 verifiers
...
[ Upstream commit 796dd1c6b680959ac968b52aa507911b288b1749 ]
This helper will be used to simplify decoders in subsequent
patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
49c5f4f27e
NFSD: Replace READ* macros in nfsd4_decode_lookup()
...
[ Upstream commit 3d5877e8e03f60d7cc804d7b230ff9c00c9c07bd ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
ab2c8c85dc
NFSD: Replace READ* macros in nfsd4_decode_locku()
...
[ Upstream commit ca9cf9fc27f8f722e9eb2763173ba01f6ac3dad1 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
72c0941906
NFSD: Replace READ* macros in nfsd4_decode_lockt()
...
[ Upstream commit 0a146f04aa0fa7a57aaed3913d1c2732b3853f31 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
9618fd094a
NFSD: Replace READ* macros in nfsd4_decode_lock()
...
[ Upstream commit 7c59deed5cd2e1cfc6cbecf06f4584ac53755f53 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
4f0ad736dc
NFSD: Add helper for decoding locker4
...
[ Upstream commit 8918cc0d2b72db9997390626010b182c4500d749 ]
Refactor for clarity.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
42ea08442d
NFSD: Add helpers to decode a clientid4 and an NFSv4 state owner
...
[ Upstream commit 144e82694092ff80b5e64749d6822cd8947587f2 ]
These helpers will also be used to simplify decoders in subsequent
patches.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
3cffafb466
NFSD: Relocate nfsd4_decode_opaque()
...
[ Upstream commit 5dcbfabb676b2b6d97767209cf707eb463ca232a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
5e006a8128
NFSD: Replace READ* macros in nfsd4_decode_link()
...
[ Upstream commit 5c505d128691c70991b766dd6a3faf49fa59ecfb ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
77de29c527
NFSD: Replace READ* macros in nfsd4_decode_getattr()
...
[ Upstream commit f759eff260f1f0b0f56531517762f27ee3233506 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:22 +01:00
Chuck Lever
6da527378e
NFSD: Replace READ* macros in nfsd4_decode_delegreturn()
...
[ Upstream commit 95e6482cedfc0785b85db49b72a05323bbf41750 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
bf141817e8
NFSD: Replace READ* macros in nfsd4_decode_create()
...
[ Upstream commit 000dfa18b3df9c62df5f768f9187cf1a94ded71d ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
9b989a3f4d
NFSD: Replace READ* macros in nfsd4_decode_fattr()
...
[ Upstream commit d1c263a031e876ac3ca5223c728e4d98ed50b3c0 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
5fab553a7f
NFSD: Replace READ* macros that decode the fattr4 umask attribute
...
[ Upstream commit 66f0476c704c86d44aa9da19d4753df66f2dbc96 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
17c4197f1e
NFSD: Replace READ* macros that decode the fattr4 security label attribute
...
[ Upstream commit dabe91828f92cd493e9e75efbc10f9878d2a73fe ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
701ce73f1b
NFSD: Replace READ* macros that decode the fattr4 time_set attributes
...
[ Upstream commit 1c3eff7ea4a98c642134ee493001ae13b79ff38c ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
a98e2e0e51
NFSD: Replace READ* macros that decode the fattr4 owner_group attribute
...
[ Upstream commit 393c31dd27f83adb06b07a1b5f0a5b8966a0f01e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
4d043b60f5
NFSD: Replace READ* macros that decode the fattr4 owner attribute
...
[ Upstream commit 9853a5ac9be381917e9be0b4133cd4ac5a7ad875 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
502e31b392
NFSD: Replace READ* macros that decode the fattr4 mode attribute
...
[ Upstream commit 1c8f0ad7dd35fd12307904036c7c839f77b6e3f9 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
9887990f86
NFSD: Replace READ* macros that decode the fattr4 acl attribute
...
[ Upstream commit c941a96823cf52e742606b486b81ab346bf111c9 ]
Refactor for clarity and to move infrequently-used code out of line.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
17ef759688
NFSD: Replace READ* macros that decode the fattr4 size attribute
...
[ Upstream commit 2ac1b9b2afbbacf597dbec722b23b6be62e4e41e ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
a2eb30f28a
NFSD: Change the way the expected length of a fattr4 is checked
...
[ Upstream commit 081d53fe0b43c47c36d1832b759bf14edde9cdbb ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
d480a578fc
NFSD: Replace READ* macros in nfsd4_decode_commit()
...
[ Upstream commit cbd9abb3706e96563b36af67595707a7054ab693 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
20599d6a9c
NFSD: Replace READ* macros in nfsd4_decode_close()
...
[ Upstream commit d3d2f38154571e70d5806b5c5264bf61c101ea15 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
0458d025b4
NFSD: Replace READ* macros in nfsd4_decode_access()
...
[ Upstream commit d169a6a9e5fd7f9e4b74e5e5d2e5a4fd0f84ef05 ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
ff3549728d
NFSD: Replace the internals of the READ_BUF() macro
...
[ Upstream commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:21 +01:00
Chuck Lever
66617e658d
NFSD: Add tracepoints in nfsd4_decode/encode_compound()
...
[ Upstream commit 08281341be8ebc97ee47999812bcf411942baa1e ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:20 +01:00
Chuck Lever
9bbac049aa
NFSD: Add tracepoints in nfsd_dispatch()
...
[ Upstream commit 0dfdad1c1d1b77b9b085f4da390464dd0ac5647a ]
For troubleshooting purposes, record GARBAGE_ARGS and CANT_ENCODE
failures.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:20 +01:00