pnfs: serialize LAYOUTGET(openstateid)
We shouldn't send a LAYOUTGET(openstateid) unless all outstanding RPCs using the previous stateid are completed. This requires choosing the stateid to encode earlier, so we can abort if one is not available (we want to use the open stateid, but a LAYOUTGET is already out using it), and adding a count of the number of outstanding rpc calls using layout state (which for now consist solely of LAYOUTGETs). Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
c31663d4a1
commit
cf7d63f1f9
@@ -1787,7 +1787,6 @@ encode_layoutget(struct xdr_stream *xdr,
|
||||
const struct nfs4_layoutget_args *args,
|
||||
struct compound_hdr *hdr)
|
||||
{
|
||||
nfs4_stateid stateid;
|
||||
__be32 *p;
|
||||
|
||||
p = reserve_space(xdr, 44 + NFS4_STATEID_SIZE);
|
||||
@@ -1798,9 +1797,7 @@ encode_layoutget(struct xdr_stream *xdr,
|
||||
p = xdr_encode_hyper(p, args->range.offset);
|
||||
p = xdr_encode_hyper(p, args->range.length);
|
||||
p = xdr_encode_hyper(p, args->minlength);
|
||||
pnfs_choose_layoutget_stateid(&stateid, NFS_I(args->inode)->layout,
|
||||
args->ctx->state);
|
||||
p = xdr_encode_opaque_fixed(p, &stateid.data, NFS4_STATEID_SIZE);
|
||||
p = xdr_encode_opaque_fixed(p, &args->stateid.data, NFS4_STATEID_SIZE);
|
||||
*p = cpu_to_be32(args->maxcount);
|
||||
|
||||
dprintk("%s: 1st type:0x%x iomode:%d off:%lu len:%lu mc:%d\n",
|
||||
|
||||
Reference in New Issue
Block a user