NFSD: added FREE_STATEID operation
This operation is used by the client to tell the server to free a stateid. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
ebc63e531c
commit
e1ca12dfb1
@@ -1245,6 +1245,19 @@ nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
|
||||
DECODE_TAIL;
|
||||
}
|
||||
|
||||
static __be32
|
||||
nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
|
||||
struct nfsd4_free_stateid *free_stateid)
|
||||
{
|
||||
DECODE_HEAD;
|
||||
|
||||
READ_BUF(sizeof(stateid_t));
|
||||
READ32(free_stateid->fr_stateid.si_generation);
|
||||
COPYMEM(&free_stateid->fr_stateid.si_opaque, sizeof(stateid_opaque_t));
|
||||
|
||||
DECODE_TAIL;
|
||||
}
|
||||
|
||||
static __be32
|
||||
nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
|
||||
struct nfsd4_sequence *seq)
|
||||
@@ -1370,7 +1383,7 @@ static nfsd4_dec nfsd41_dec_ops[] = {
|
||||
[OP_EXCHANGE_ID] = (nfsd4_dec)nfsd4_decode_exchange_id,
|
||||
[OP_CREATE_SESSION] = (nfsd4_dec)nfsd4_decode_create_session,
|
||||
[OP_DESTROY_SESSION] = (nfsd4_dec)nfsd4_decode_destroy_session,
|
||||
[OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_notsupp,
|
||||
[OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_free_stateid,
|
||||
[OP_GET_DIR_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
|
||||
[OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_notsupp,
|
||||
[OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
|
||||
@@ -3115,6 +3128,21 @@ nfsd4_encode_destroy_session(struct nfsd4_compoundres *resp, int nfserr,
|
||||
return nfserr;
|
||||
}
|
||||
|
||||
static __be32
|
||||
nfsd4_encode_free_stateid(struct nfsd4_compoundres *resp, int nfserr,
|
||||
struct nfsd4_free_stateid *free_stateid)
|
||||
{
|
||||
__be32 *p;
|
||||
|
||||
if (nfserr)
|
||||
return nfserr;
|
||||
|
||||
RESERVE_SPACE(4);
|
||||
WRITE32(nfserr);
|
||||
ADJUST_ARGS();
|
||||
return nfserr;
|
||||
}
|
||||
|
||||
static __be32
|
||||
nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
|
||||
struct nfsd4_sequence *seq)
|
||||
@@ -3196,7 +3224,7 @@ static nfsd4_enc nfsd4_enc_ops[] = {
|
||||
[OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
|
||||
[OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
|
||||
[OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_destroy_session,
|
||||
[OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
|
||||
[OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_free_stateid,
|
||||
[OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
|
||||
[OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
|
||||
[OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
|
||||
|
Reference in New Issue
Block a user