Skip to content

Commit

Permalink
Merge pull request #1269 from kofemann/fix-iss8599-2.10
Browse files Browse the repository at this point in the history
Fix for  ticket 8599
  • Loading branch information
paulmillar committed Feb 3, 2015
2 parents 4d54186 + 48178df commit 9a28806
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Expand Up @@ -93,7 +93,6 @@
import org.dcache.nfs.vfs.Inode;
import org.dcache.nfs.vfs.VfsCache;
import org.dcache.nfs.vfs.VfsCacheConfig;
import org.dcache.nfs.vfs.VirtualFileSystem;
import org.dcache.util.RedirectedTransfer;
import org.dcache.util.Transfer;
import org.dcache.util.TransferRetryPolicy;
Expand Down Expand Up @@ -177,7 +176,7 @@ public class NFSv41Door extends AbstractCellComponent implements

private boolean _enableRpcsecGss;

private VirtualFileSystem _vfs;
private VfsCache _vfs;

private LoginBrokerHandler _loginBrokerHandler;

Expand Down Expand Up @@ -364,10 +363,11 @@ public void messageArrived(DoorTransferFinishedMessage transferFinishedMessage)
NFS4ProtocolInfo protocolInfo = (NFS4ProtocolInfo)transferFinishedMessage.getProtocolInfo();
_log.debug("Mover {} done.", protocolInfo.stateId());
org.dcache.chimera.nfs.v4.xdr.stateid4 legacyStateid = protocolInfo.stateId();
Transfer transfer = _ioMessages.remove(new stateid4(legacyStateid.other, legacyStateid.seqid.value));
NfsTransfer transfer = _ioMessages.remove(new stateid4(legacyStateid.other, legacyStateid.seqid.value));
if(transfer != null) {
transfer.finished(transferFinishedMessage);
transfer.notifyBilling(transferFinishedMessage.getReturnCode(), "");
_vfs.invalidateStatCache(transfer.getInode());
}
}

Expand Down Expand Up @@ -440,7 +440,7 @@ public Layout layoutGet(CompoundContext context, Inode nfsInode, int ioMode, sta
Transfer.initSession();
NfsTransfer transfer = _ioMessages.get(stateid);
if (transfer == null) {
transfer = new NfsTransfer(_pnfsHandler,
transfer = new NfsTransfer(_pnfsHandler, nfsInode,
context.getRpcCall().getCredential().getSubject());

transfer.setProtocolInfo(protocolInfo);
Expand Down Expand Up @@ -697,8 +697,11 @@ public String toString() {

private static class NfsTransfer extends RedirectedTransfer<PoolDS> {

NfsTransfer(PnfsHandler pnfs, Subject ioSubject) {
private final Inode _nfsInode;

NfsTransfer(PnfsHandler pnfs, Inode nfsInode, Subject ioSubject) {
super(pnfs, Subjects.ROOT, ioSubject, new FsPath("/"));
_nfsInode = nfsInode;
}

@Override
Expand All @@ -710,6 +713,10 @@ public String toString() {
((NFS4ProtocolInfo)getProtocolInfoForPool()).stateId(),
((NFS4ProtocolInfo)getProtocolInfoForPool()).getSocketAddress().getAddress().getHostAddress());
}

Inode getInode() {
return _nfsInode;
}
}

/*
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -802,7 +802,7 @@
<dependency>
<groupId>org.dcache</groupId>
<artifactId>nfs4j-core</artifactId>
<version>0.8.5</version>
<version>0.8.6</version>
<exclusions>
<exclusion>
<groupId>org.dcache.chimera</groupId>
Expand Down

0 comments on commit 9a28806

Please sign in to comment.