NFSD COPY_NOTIFY xdr

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
This commit is contained in:
Olga Kornievskaia
2019-08-08 11:14:59 -04:00
committed by J. Bruce Fields
parent 84e1b21d5e
commit 51911868fc
3 changed files with 129 additions and 2 deletions

View File

@@ -1339,6 +1339,13 @@ nfsd4_offload_cancel(struct svc_rqst *rqstp,
return status;
}
static __be32
nfsd4_copy_notify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
union nfsd4_op_u *u)
{
return nfserr_notsupp;
}
static __be32
nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_fallocate *fallocate, int flags)
@@ -2292,6 +2299,21 @@ static inline u32 nfsd4_offload_status_rsize(struct svc_rqst *rqstp,
1 /* osr_complete<1> optional 0 for now */) * sizeof(__be32);
}
static inline u32 nfsd4_copy_notify_rsize(struct svc_rqst *rqstp,
struct nfsd4_op *op)
{
return (op_encode_hdr_size +
3 /* cnr_lease_time */ +
1 /* We support one cnr_source_server */ +
1 /* cnr_stateid seq */ +
op_encode_stateid_maxsz /* cnr_stateid */ +
1 /* num cnr_source_server*/ +
1 /* nl4_type */ +
1 /* nl4 size */ +
XDR_QUADLEN(NFS4_OPAQUE_LIMIT) /*nl4_loc + nl4_loc_sz */)
* sizeof(__be32);
}
#ifdef CONFIG_NFSD_PNFS
static inline u32 nfsd4_getdeviceinfo_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op)
{
@@ -2716,6 +2738,12 @@ static const struct nfsd4_operation nfsd4_ops[] = {
.op_name = "OP_OFFLOAD_CANCEL",
.op_rsize_bop = nfsd4_only_status_rsize,
},
[OP_COPY_NOTIFY] = {
.op_func = nfsd4_copy_notify,
.op_flags = OP_MODIFIES_SOMETHING,
.op_name = "OP_COPY_NOTIFY",
.op_rsize_bop = nfsd4_copy_notify_rsize,
},
};
/**