Commit 7f34973f authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfsv41: pass cacheThis to the the corresponding slot

parent d863ba71
......@@ -68,8 +68,9 @@ public class NFSv41Session {
return _slots.length - 1;
}
public boolean updateSlot(int slot, int sequence, List<nfs_resop4> reply) throws ChimeraNFSException {
return getSlot(slot).update(sequence, reply);
public boolean updateSlot(int slot, int sequence, boolean cacheThis, List<nfs_resop4> reply)
throws ChimeraNFSException {
return getSlot(slot).update(sequence, reply, cacheThis);
}
/**
......
......@@ -56,8 +56,6 @@ public class OperationSEQUENCE extends AbstractNFSv4Operation {
* in a COMPOUND. Such operations will get the error NFS4ERR_OP_NOT_IN_SESSION if they do
* appear at the start of a COMPOUND.
*
*
*
*/
......@@ -87,19 +85,17 @@ public class OperationSEQUENCE extends AbstractNFSv4Operation {
}
List<nfs_resop4> reply;
if (_args.opsequence.sa_cachethis) {
reply = context.processedOperations();
} else {
reply = null;
}
if (session.updateSlot(_args.opsequence.sa_slotid.value.value, _args.opsequence.sa_sequenceid.value.value, reply)) {
List<nfs_resop4> reply = context.processedOperations();
if(session.updateSlot(_args.opsequence.sa_slotid.value.value,
_args.opsequence.sa_sequenceid.value.value,
_args.opsequence.sa_cachethis, reply)){
/*
* retransmit + cached reply available.
* Stop processing.
*/
* retransmit + cached reply available.
* Stop processing.
*/
return false;
}
session.getClient().updateLeaseTime(NFSv4Defaults.NFS4_LEASE_TIME);
context.setSession(session);
......
......@@ -49,7 +49,7 @@ public class SessionSlot {
* @return true if retransmit is detected and cached reply available.
* @throws ChimeraNFSException
*/
boolean update(int sequence, List<nfs_resop4> reply) throws ChimeraNFSException {
boolean update(int sequence, List<nfs_resop4> reply, boolean cacheThis) throws ChimeraNFSException {
if( sequence == _sequence ) {
_log.info("retransmit detected");
......@@ -85,7 +85,11 @@ public class SessionSlot {
}
_sequence = sequence;
_reply = reply;
if( cacheThis ){
_reply = reply;
}else{
_reply = null;
}
return false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment