A very quiet cycle for nfsd, mainly just an RDMA update from Chuck Lever.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXRL2PAAoJECebzXlCjuG+c34P/1wnkehVxDozBJp7UEzhrsE/ U1dpwfykzVEIMh68TldBvyrt2Lb4ThLPZ7V2dVwNqA831S/VM6fWJyw8WerSgGgU SUGOzdF04rNfy41lXQNpDiiC417Fbp4Js4O+Q5kd+8kqQbXYqCwz0ce3DVbAT571 JmJgBI8gZLhicyNRDOt0y6C+/3P+0bbXYvS8wkzY+CwbNczHJOCLhwViKzWTptm9 LCSgDGm68ckpR7mZkWfEF3WdiZ9+SxeI+pT9dcomzxNfbv8NluDplYmdLbepA2J8 uWHGprVe9WJMDnw4hJhrI2b3/rHIntpxuZYktmnb/z/ezBTyi3FXYWgAEdE1by+Y Gf7OewKOp8XcQ/iHRZ8vwXNrheHAr9++SB49mGBZJ3qj6bO+FrISQKX9FRxo6PrJ SDRgYjt5yUG2oD1AAs1NzuBPqZzR40mA6Yk4zuNAcxzK/S7DdRF/9Kjyk86TVv08 3E3O5i1RyVcU/A7JdnbiyeDFMQoRshdnN0HShIZcSfcfW+qFKghNlO9bFfSl904F jlG6moNB5OBiV8FNOelY+HGAYoUdw120QxqQMv47oZGKCjv+rfK38aB4GBJ4iEuo TrGqNmrMrs/AKdL3Sd+8LuJqSfXggrwUDc/KS6CFz/U0eBbp6k0kcd7FEyG/J8kW JxQ0URgyJ+DHfc60E8LN =k6RP -----END PGP SIGNATURE----- Merge tag 'nfsd-4.7' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "A very quiet cycle for nfsd, mainly just an RDMA update from Chuck Lever" * tag 'nfsd-4.7' of git://linux-nfs.org/~bfields/linux: sunrpc: fix stripping of padded MIC tokens svcrpc: autoload rdma module svcrdma: Generalize svc_rdma_xdr_decode_req() svcrdma: Eliminate code duplication in svc_rdma_recvfrom() svcrdma: Drain QP before freeing svcrdma_xprt svcrdma: Post Receives only for forward channel requests svcrdma: Remove superfluous line from rdma_read_chunks() svcrdma: svc_rdma_put_context() is invoked twice in Send error path svcrdma: Do not add XDR padding to xdr_buf page vector svcrdma: Support IPv6 with NFS/RDMA nfsd: handle seqid wraparound in nfsd4_preprocess_layout_stateid Remove unnecessary allocation
This commit is contained in:
commit
5d22c5ab85
11 changed files with 90 additions and 72 deletions
|
@ -379,7 +379,7 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
|
|||
*/
|
||||
hdr = (void*)p - rqstp->rq_arg.head[0].iov_base;
|
||||
dlen = rqstp->rq_arg.head[0].iov_len + rqstp->rq_arg.page_len
|
||||
- hdr;
|
||||
+ rqstp->rq_arg.tail[0].iov_len - hdr;
|
||||
/*
|
||||
* Round the length of the data which was specified up to
|
||||
* the next multiple of XDR units and then compare that
|
||||
|
|
|
@ -289,7 +289,7 @@ nfsd4_preprocess_layout_stateid(struct svc_rqst *rqstp,
|
|||
|
||||
status = nfserr_bad_stateid;
|
||||
mutex_lock(&ls->ls_mutex);
|
||||
if (stateid->si_generation > stid->sc_stateid.si_generation)
|
||||
if (nfsd4_stateid_generation_after(stateid, &stid->sc_stateid))
|
||||
goto out_unlock_stid;
|
||||
if (layout_type != ls->ls_layout_type)
|
||||
goto out_unlock_stid;
|
||||
|
|
|
@ -4651,12 +4651,6 @@ grace_disallows_io(struct net *net, struct inode *inode)
|
|||
return opens_in_grace(net) && mandatory_lock(inode);
|
||||
}
|
||||
|
||||
/* Returns true iff a is later than b: */
|
||||
static bool stateid_generation_after(stateid_t *a, stateid_t *b)
|
||||
{
|
||||
return (s32)(a->si_generation - b->si_generation) > 0;
|
||||
}
|
||||
|
||||
static __be32 check_stateid_generation(stateid_t *in, stateid_t *ref, bool has_session)
|
||||
{
|
||||
/*
|
||||
|
@ -4670,7 +4664,7 @@ static __be32 check_stateid_generation(stateid_t *in, stateid_t *ref, bool has_s
|
|||
return nfs_ok;
|
||||
|
||||
/* If the client sends us a stateid from the future, it's buggy: */
|
||||
if (stateid_generation_after(in, ref))
|
||||
if (nfsd4_stateid_generation_after(in, ref))
|
||||
return nfserr_bad_stateid;
|
||||
/*
|
||||
* However, we could see a stateid from the past, even from a
|
||||
|
|
|
@ -573,6 +573,11 @@ enum nfsd4_cb_op {
|
|||
NFSPROC4_CLNT_CB_SEQUENCE,
|
||||
};
|
||||
|
||||
/* Returns true iff a is later than b: */
|
||||
static inline bool nfsd4_stateid_generation_after(stateid_t *a, stateid_t *b)
|
||||
{
|
||||
return (s32)(a->si_generation - b->si_generation) > 0;
|
||||
}
|
||||
|
||||
struct nfsd4_compound_state;
|
||||
struct nfsd_net;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue