Skip to content

Commit 885e2bf

Browse files
olgakorn1J. Bruce Fields
authored andcommitted
NFSD OFFLOAD_CANCEL xdr
Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 6308bc9 commit 885e2bf

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,14 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
11221122
return status;
11231123
}
11241124

1125+
static __be32
1126+
nfsd4_offload_cancel(struct svc_rqst *rqstp,
1127+
struct nfsd4_compound_state *cstate,
1128+
union nfsd4_op_u *u)
1129+
{
1130+
return 0;
1131+
}
1132+
11251133
static __be32
11261134
nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
11271135
struct nfsd4_fallocate *fallocate, int flags)
@@ -2480,6 +2488,12 @@ static const struct nfsd4_operation nfsd4_ops[] = {
24802488
.op_name = "OP_OFFLOAD_STATUS",
24812489
.op_rsize_bop = nfsd4_offload_status_rsize,
24822490
},
2491+
[OP_OFFLOAD_CANCEL] = {
2492+
.op_func = nfsd4_offload_cancel,
2493+
.op_flags = OP_MODIFIES_SOMETHING,
2494+
.op_name = "OP_OFFLOAD_CANCEL",
2495+
.op_rsize_bop = nfsd4_only_status_rsize,
2496+
},
24832497
};
24842498

24852499
/**

fs/nfsd/nfs4xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ static const nfsd4_dec nfsd4_dec_ops[] = {
18801880
[OP_IO_ADVISE] = (nfsd4_dec)nfsd4_decode_notsupp,
18811881
[OP_LAYOUTERROR] = (nfsd4_dec)nfsd4_decode_notsupp,
18821882
[OP_LAYOUTSTATS] = (nfsd4_dec)nfsd4_decode_notsupp,
1883-
[OP_OFFLOAD_CANCEL] = (nfsd4_dec)nfsd4_decode_notsupp,
1883+
[OP_OFFLOAD_CANCEL] = (nfsd4_dec)nfsd4_decode_offload_status,
18841884
[OP_OFFLOAD_STATUS] = (nfsd4_dec)nfsd4_decode_offload_status,
18851885
[OP_READ_PLUS] = (nfsd4_dec)nfsd4_decode_notsupp,
18861886
[OP_SEEK] = (nfsd4_dec)nfsd4_decode_seek,

0 commit comments

Comments
 (0)