Skip to content

Commit

Permalink
nfs: ensure that mover always associated with an open-stateid
Browse files Browse the repository at this point in the history
Motivation:
When pNFS is used in combination of locking or delegation then the NFS
door will allocate mover with incorrect state id type. Thus clients,
that use open-stateid will get BAD_STATE from the pools.

Modification:
Update the NFS door to ensure that layout and mover always associated
with open-stateid.

Result:
correct pNFS IO operations, even if locking or delegations are used.

Acked-by: Paul Millar
Target: master, 9.0, 8.2
Require-book: no
Require-notes: yes
  • Loading branch information
kofemann committed Mar 28, 2023
1 parent b080d27 commit 7d9baa5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ public Layout layoutGet(CompoundContext context, LAYOUTGET4args args)
final InetSocketAddress remote = context.getRpcCall().getTransport()
.getRemoteSocketAddress();
final NFS4ProtocolInfo protocolInfo = new NFS4ProtocolInfo(remote,
new org.dcache.chimera.nfs.v4.xdr.stateid4(stateid),
new org.dcache.chimera.nfs.v4.xdr.stateid4(openStateId.stateid()),
nfsInode.toNfsHandle()
);

Expand Down Expand Up @@ -800,7 +800,7 @@ public Layout layoutGet(CompoundContext context, LAYOUTGET4args args)
layout.lo_iomode = args.loga_iomode;
layout.lo_offset = new offset4(0);
layout.lo_length = new length4(nfs4_prot.NFS4_UINT64_MAX);
layout.lo_content = layoutDriver.getLayoutContent(stateid,
layout.lo_content = layoutDriver.getLayoutContent(openStateId.stateid(),
NFSv4Defaults.NFS4_STRIPE_SIZE, new nfs_fh4(nfsInode.toNfsHandle()), devices);

layoutStateId.bumpSeqid();
Expand Down

0 comments on commit 7d9baa5

Please sign in to comment.