diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2019-06-04 11:54:18 -0400 |
---|---|---|
committer | Olga Kornievskaia <olga.kornievskaia@gmail.com> | 2019-10-09 12:05:49 -0400 |
commit | 1d38f3f0d70008671f4dc055697ff3c3bb44a284 (patch) | |
tree | 9892468d67c59a6a1131a499fe4a0aa984926fd2 /fs/nfs/nfs42xdr.c | |
parent | 0491567b51efeca807da1125a1a0d5193875e286 (diff) | |
download | linux-1d38f3f0d70008671f4dc055697ff3c3bb44a284.tar.bz2 |
NFS: add ca_source_server<> to COPY
Support only one source server address: the same address that
the client and source server use.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Diffstat (limited to 'fs/nfs/nfs42xdr.c')
-rw-r--r-- | fs/nfs/nfs42xdr.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c index ccabc0cd93dd..c03f3246d6c5 100644 --- a/fs/nfs/nfs42xdr.c +++ b/fs/nfs/nfs42xdr.c @@ -21,7 +21,10 @@ #define encode_copy_maxsz (op_encode_hdr_maxsz + \ XDR_QUADLEN(NFS4_STATEID_SIZE) + \ XDR_QUADLEN(NFS4_STATEID_SIZE) + \ - 2 + 2 + 2 + 1 + 1 + 1) + 2 + 2 + 2 + 1 + 1 + 1 +\ + 1 + /* One cnr_source_server */\ + 1 + /* nl4_type */ \ + 1 + XDR_QUADLEN(NFS4_OPAQUE_LIMIT)) #define decode_copy_maxsz (op_decode_hdr_maxsz + \ NFS42_WRITE_RES_SIZE + \ 1 /* cr_consecutive */ + \ @@ -216,7 +219,12 @@ static void encode_copy(struct xdr_stream *xdr, encode_uint32(xdr, 1); /* consecutive = true */ encode_uint32(xdr, args->sync); - encode_uint32(xdr, 0); /* src server list */ + if (args->cp_src == NULL) { /* intra-ssc */ + encode_uint32(xdr, 0); /* no src server list */ + return; + } + encode_uint32(xdr, 1); /* supporting 1 server */ + encode_nl4_server(xdr, args->cp_src); } static void encode_offload_cancel(struct xdr_stream *xdr, |