mbox series

[v2,0/7] Client-side OFFLOAD_STATUS implementation

Message ID 20241220154227.16873-9-cel@kernel.org (mailing list archive)
Headers show
Series Client-side OFFLOAD_STATUS implementation | expand

Message

Chuck Lever Dec. 20, 2024, 3:42 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

SCSI implementation experience has shown that an interrupt-only
COPY offload implementation is not reliable. There are too many
common scenarios where the client can miss the completion interrupt
(in our case, this is a CB_OFFLOAD callback).

Therefore, a polling mechanism is needed. The NFSv4.2 protocol
provides one in the form of the new OFFLOAD_STATUS operation. Linux
NFSD implements OFFLOAD_STATUS already. This series adds a Linux NFS
client implementation of the OFFLOAD_STATUS operation that can query
the state of a background COPY on the server.

These patches are also available here:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=fix-async-copy

Changes since v1:
- nfs42_proc_offload_status() now uses a synchronous RPC

Chuck Lever (7):
  NFS: CB_OFFLOAD can return NFS4ERR_DELAY
  NFS: Fix typo in OFFLOAD_CANCEL comment
  NFS: Rename struct nfs4_offloadcancel_data
  NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR
  NFS: Implement NFSv4.2's OFFLOAD_STATUS operation
  NFS: Use NFSv4.2's OFFLOAD_STATUS operation
  NFS: Refactor trace_nfs4_offload_cancel

 fs/nfs/callback_proc.c    |   2 +-
 fs/nfs/nfs42proc.c        | 188 ++++++++++++++++++++++++++++++++++----
 fs/nfs/nfs42xdr.c         |  88 +++++++++++++++++-
 fs/nfs/nfs4proc.c         |   3 +-
 fs/nfs/nfs4trace.h        |  11 ++-
 fs/nfs/nfs4xdr.c          |   1 +
 include/linux/nfs4.h      |   1 +
 include/linux/nfs_fs_sb.h |   1 +
 include/linux/nfs_xdr.h   |   5 +-
 9 files changed, 275 insertions(+), 25 deletions(-)

Comments

Jeff Layton Dec. 20, 2024, 4:46 p.m. UTC | #1
On Fri, 2024-12-20 at 10:42 -0500, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
> 
> SCSI implementation experience has shown that an interrupt-only
> COPY offload implementation is not reliable. There are too many
> common scenarios where the client can miss the completion interrupt
> (in our case, this is a CB_OFFLOAD callback).
> 
> Therefore, a polling mechanism is needed. The NFSv4.2 protocol
> provides one in the form of the new OFFLOAD_STATUS operation. Linux
> NFSD implements OFFLOAD_STATUS already. This series adds a Linux NFS
> client implementation of the OFFLOAD_STATUS operation that can query
> the state of a background COPY on the server.
> 
> These patches are also available here:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=fix-async-copy
> 
> Changes since v1:
> - nfs42_proc_offload_status() now uses a synchronous RPC
> 
> Chuck Lever (7):
>   NFS: CB_OFFLOAD can return NFS4ERR_DELAY
>   NFS: Fix typo in OFFLOAD_CANCEL comment
>   NFS: Rename struct nfs4_offloadcancel_data
>   NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR
>   NFS: Implement NFSv4.2's OFFLOAD_STATUS operation
>   NFS: Use NFSv4.2's OFFLOAD_STATUS operation
>   NFS: Refactor trace_nfs4_offload_cancel
> 
>  fs/nfs/callback_proc.c    |   2 +-
>  fs/nfs/nfs42proc.c        | 188 ++++++++++++++++++++++++++++++++++----
>  fs/nfs/nfs42xdr.c         |  88 +++++++++++++++++-
>  fs/nfs/nfs4proc.c         |   3 +-
>  fs/nfs/nfs4trace.h        |  11 ++-
>  fs/nfs/nfs4xdr.c          |   1 +
>  include/linux/nfs4.h      |   1 +
>  include/linux/nfs_fs_sb.h |   1 +
>  include/linux/nfs_xdr.h   |   5 +-
>  9 files changed, 275 insertions(+), 25 deletions(-)
> 

Nice work, Chuck. This all looks good to me.

Reviewed-by: Jeff Layton <jlayton@kernel.org>