mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
NFSv4.1: Add xdr support for CLAIM_FH and CLAIM_DELEG_CUR_FH opens
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
4a1c089345
commit
d9fc6619ca
@ -1459,6 +1459,23 @@ static inline void encode_claim_delegate_cur(struct xdr_stream *xdr, const struc
|
||||
encode_string(xdr, name->len, name->name);
|
||||
}
|
||||
|
||||
static inline void encode_claim_fh(struct xdr_stream *xdr)
|
||||
{
|
||||
__be32 *p;
|
||||
|
||||
p = reserve_space(xdr, 4);
|
||||
*p = cpu_to_be32(NFS4_OPEN_CLAIM_FH);
|
||||
}
|
||||
|
||||
static inline void encode_claim_delegate_cur_fh(struct xdr_stream *xdr, const nfs4_stateid *stateid)
|
||||
{
|
||||
__be32 *p;
|
||||
|
||||
p = reserve_space(xdr, 4);
|
||||
*p = cpu_to_be32(NFS4_OPEN_CLAIM_DELEG_CUR_FH);
|
||||
encode_nfs4_stateid(xdr, stateid);
|
||||
}
|
||||
|
||||
static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg, struct compound_hdr *hdr)
|
||||
{
|
||||
encode_op_hdr(xdr, OP_OPEN, decode_open_maxsz, hdr);
|
||||
@ -1474,6 +1491,12 @@ static void encode_open(struct xdr_stream *xdr, const struct nfs_openargs *arg,
|
||||
case NFS4_OPEN_CLAIM_DELEGATE_CUR:
|
||||
encode_claim_delegate_cur(xdr, arg->name, &arg->u.delegation);
|
||||
break;
|
||||
case NFS4_OPEN_CLAIM_FH:
|
||||
encode_claim_fh(xdr);
|
||||
break;
|
||||
case NFS4_OPEN_CLAIM_DELEG_CUR_FH:
|
||||
encode_claim_delegate_cur_fh(xdr, &arg->u.delegation);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user