Re: [PATCH v2] NFSD: Rework encoding and decoding of nfsd4_deviceid
From: Chuck Lever
Date: Mon Jul 21 2025 - 11:02:47 EST
From: Chuck Lever <chuck.lever@xxxxxxxxxx>
On Mon, 21 Jul 2025 17:48:55 +0300, Sergey Bashirov wrote:
> Compilers may optimize the layout of C structures, so we should not rely
> on sizeof struct and memcpy to encode and decode XDR structures. The byte
> order of the fields should also be taken into account.
>
> This patch adds the correct functions to handle the deviceid4 structure
> and removes the pad field, which is currently not used by NFSD, from the
> runtime state. The server's byte order is preserved because the deviceid4
> blob on the wire is only used as a cookie by the client.
>
> [...]
Applied to nfsd-testing, thanks!
Note that:
- nfsd-implement-large-extent-array-support-in-pnfs
- nfsd-fix-last-write-offset-handling-in-layoutcommit
have been dropped from nfsd-testing because of conflicts with
this patch. Please rebase these two on the current nfsd-testing
branch and resend.
[1/1] NFSD: Rework encoding and decoding of nfsd4_deviceid
commit: 52d6381bf1caa63f6cd8b3df54162f36b03b3a68
--
Chuck Lever