Chuck Lever
a445bf2a33
NFSD: Add a helper to decode channel_attrs4
...
[ Upstream commit 3a3f1fbacb0960b628e5a9f07c78287312f7a99d ]
De-duplicate some code.
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
bda2edd08b
NFSD: Add a helper to decode nfs_impl_id4
...
[ Upstream commit 10ff84228197f47401833495ba19a50131323b4a ]
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:24 +01:00
Chuck Lever
c26952337e
NFSD: Add a helper to decode state_protect4_a
...
[ Upstream commit 523ec6ed6fb80fd1537d748a06bffd060a8b3235 ]
Refactor for clarity.
Also, remove a stale comment. Commit ed94164398c9 ("nfsd: implement
machine credential support for some operations") added support for
SP4_MACH_CRED, so state_protect_a is no longer completely ignored.
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
39814dfd55
NFSD: Add a separate decoder for ssv_sp_parms
...
[ Upstream commit 547bfeb4cd8d491aabbd656d5a6f410cb4249b4e ]
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:24 +01:00
Chuck Lever
0316890507
NFSD: Add a separate decoder to handle state_protect_ops
...
[ Upstream commit 2548aa784d760567c2a77cbd8b7c55b211167c37 ]
Refactor for clarity and de-duplication of code.
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
75e7eb55d1
NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session()
...
[ Upstream commit 571e0451c4de0a545960ffaea16d969931afc563 ]
A dedicated sessionid4 decoder is introduced that 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:24 +01:00
Chuck Lever
2f29d0b531
NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl()
...
[ Upstream commit 0f81d96098f8eb707afe2f8d5c3fe0f9316ef5ce ]
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
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