- From 078c79ebc468cef3e7e52117ee6f8df1d29fcd33 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 27 Jan 2025 14:57:40 +0100
- Subject: [PATCH 1/2] daemon: Remove |NFS41_MAX_FILEIO_SIZE| limit
- Remove |NFS41_MAX_FILEIO_SIZE| limit
- Reported-by: Lionel Cons <lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/nfs41_const.h | 1 -
- daemon/nfs41_xdr.c | 5 ++++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
- diff --git a/daemon/nfs41_const.h b/daemon/nfs41_const.h
- index c785df6..0d86b8d 100644
- --- a/daemon/nfs41_const.h
- +++ b/daemon/nfs41_const.h
- @@ -47,7 +47,6 @@
- */
- #define NFS4_FATTR4_OWNER_LIMIT (256)
- -#define NFS41_MAX_FILEIO_SIZE (1024 * 1024)
- #define NFS41_MAX_SERVER_CACHE 1024
- #define NFS41_MAX_RPC_REQS 128
- diff --git a/daemon/nfs41_xdr.c b/daemon/nfs41_xdr.c
- index 1108950..4ed4102 100644
- --- a/daemon/nfs41_xdr.c
- +++ b/daemon/nfs41_xdr.c
- @@ -2915,7 +2915,10 @@ static bool_t encode_op_write(
- if (!xdr_u_int32_t(xdr, &args->stable))
- return FALSE;
- - return xdr_bytes(xdr, (char **)&data, &args->data_len, NFS41_MAX_FILEIO_SIZE);
- + if (!xdr_u_int32_t(xdr, &args->data_len))
- + return FALSE;
- +
- + return xdr_opaque(xdr, (char *)data, args->data_len);
- }
- static bool_t xdr_write_verf(
- --
- 2.45.1
- From 60da8ccf8a78092ec62ed18121aa8a54ed727024 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 27 Jan 2025 15:04:17 +0100
- Subject: [PATCH 2/2] daemon: Add NFSv4.2+RFC8726 OPs to
- |nfs_opnum_to_string()|
- Add NFSv4.2+RFC8726 OPs to |nfs_opnum_to_string()|
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/daemon_debug.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
- diff --git a/daemon/daemon_debug.c b/daemon/daemon_debug.c
- index 80ce999..50a915e 100644
- --- a/daemon/daemon_debug.c
- +++ b/daemon/daemon_debug.c
- @@ -531,6 +531,26 @@ const char* nfs_opnum_to_string(int opnum)
- NFSOPNUM_TO_STRLITERAL(OP_WANT_DELEGATION)
- NFSOPNUM_TO_STRLITERAL(OP_DESTROY_CLIENTID)
- NFSOPNUM_TO_STRLITERAL(OP_RECLAIM_COMPLETE)
- + /* new operations for NFSv4.2 */
- + NFSOPNUM_TO_STRLITERAL(OP_ALLOCATE)
- + NFSOPNUM_TO_STRLITERAL(OP_COPY)
- + NFSOPNUM_TO_STRLITERAL(OP_COPY_NOTIFY)
- + NFSOPNUM_TO_STRLITERAL(OP_DEALLOCATE)
- + NFSOPNUM_TO_STRLITERAL(OP_IO_ADVISE)
- + NFSOPNUM_TO_STRLITERAL(OP_LAYOUTERROR)
- + NFSOPNUM_TO_STRLITERAL(OP_LAYOUTSTATS)
- + NFSOPNUM_TO_STRLITERAL(OP_OFFLOAD_CANCEL)
- + NFSOPNUM_TO_STRLITERAL(OP_OFFLOAD_STATUS)
- + NFSOPNUM_TO_STRLITERAL(OP_READ_PLUS)
- + NFSOPNUM_TO_STRLITERAL(OP_SEEK)
- + NFSOPNUM_TO_STRLITERAL(OP_WRITE_SAME)
- + NFSOPNUM_TO_STRLITERAL(OP_CLONE)
- + /* xattr support (RFC8726) */
- + NFSOPNUM_TO_STRLITERAL(OP_GETXATTR)
- + NFSOPNUM_TO_STRLITERAL(OP_SETXATTR)
- + NFSOPNUM_TO_STRLITERAL(OP_LISTXATTRS)
- + NFSOPNUM_TO_STRLITERAL(OP_REMOVEXATTR)
- +
- NFSOPNUM_TO_STRLITERAL(OP_ILLEGAL)
- }
- return "<invalid nfs opnum>";
- --
- 2.45.1
msnfs41client: Patches for adding NFSv4.2 OPs to debug+remove |NFS41_MAX_FILEIO_SIZE| limit, 2025-01-27
Posted by Anonymous on Mon 27th Jan 2025 15:44
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.