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
(cherry picked from commit 7d9baa5)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
  • Loading branch information
kofemann authored and mksahakyan committed Mar 29, 2023
1 parent 91f7a8f commit 09d7ec5
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -707,7 +707,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 @@ -796,7 +796,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 09d7ec5

Please sign in to comment.