RFC NFSD: expand the implementation of OFFLOAD_STATUS
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | NFSD: Record status of async copy operation in struct nfsd4_copyfs/ fs/ | +11 | 0 replies | |
| 2/2 | NFSD: Add COPY status code to OFFLOAD_STATUS responsefs/ fs/ fs/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] NFSD: expand the implementation of OFFLOAD_STATUS
From: Chuck Lever <[email protected]>
I'm looking at RFC 7862 to try to understand what the various OFFLOAD_STATUS responses mean.
Quoted 6 lines
15.9.3. DESCRIPTION
OFFLOAD_STATUScan be used by the client to query the progress of an asynchronous operation, which is identified by bothCURRENT_FHand theosa_stateid. If this operation is successful, the number of bytes processed is returned to the client in theosr_countfield.
NFSD returns only the byte count today.
Quoted 3 lines
If the optional
osr_completefield is present, the asynchronous operation has completed. In this case, the status value indicates the result of the asynchronous operation.
NFSD currently never returns the status code -- NFSD's response XDR encoder always stuffs "zero" in the array count for the osr_complete array. IMO, zero is OK, but only for the “COPY is still running” case.
Once the async COPY has completed, a subsequent OFFLOAD_STATUS should show that the COPY succeeded (or failed), until the server receives the client’s CB_OFFLOAD reply, or until the client’s lease expires.
For the "COPY has completed successfully" case, the above text suggests that OFFLOAD_STATUS returns NFS4_OK, and needs to return a proper status code in the osr_complete array: Probably NFS4_OK.
A "COPY has completed but failed" status can be reported by OFFLOAD_STATUS returning NFS4_OK and setting the osr_complete field to the failing COPY status code.
The two patches here change NFSD in that direction.
Chuck Lever (2):
NFSD: Record status of async copy operation in struct nfsd4_copy
NFSD: Add COPY status code to OFFLOAD_STATUS response
fs/nfsd/nfs4proc.c | 31 ++++++++++++++++++------------- fs/nfsd/nfs4xdr.c | 7 ++++++- fs/nfsd/xdr4.h | 5 ++++- 3 files changed, 28 insertions(+), 15 deletions(-)
base-commit: 06cd86b25b980a58e5584e9cd38c080467b24c25
Signature · 1 line
2.44.0