|
@@ -160,7 +160,6 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
private final long blockSize;
|
|
private final long blockSize;
|
|
private final int bufferSize;
|
|
private final int bufferSize;
|
|
private final boolean aixCompatMode;
|
|
private final boolean aixCompatMode;
|
|
- private Statistics statistics;
|
|
|
|
private String writeDumpDir; // The dir save dump files
|
|
private String writeDumpDir; // The dir save dump files
|
|
|
|
|
|
private final RpcCallCache rpcCallCache;
|
|
private final RpcCallCache rpcCallCache;
|
|
@@ -245,7 +244,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
pauseMonitor.start();
|
|
pauseMonitor.start();
|
|
metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
|
|
metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
|
|
}
|
|
}
|
|
- writeManager.startAsyncDataSerivce();
|
|
|
|
|
|
+ writeManager.startAsyncDataService();
|
|
try {
|
|
try {
|
|
infoServer.start();
|
|
infoServer.start();
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
@@ -331,7 +330,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("GETATTR for fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("GETATTR for fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -356,7 +355,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
- LOG.error("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.error("Can't get path for fileId: " + handle.getFileId());
|
|
response.setStatus(Nfs3Status.NFS3ERR_STALE);
|
|
response.setStatus(Nfs3Status.NFS3ERR_STALE);
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
@@ -372,7 +371,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
if (setMode && updateFields.contains(SetAttrField.MODE)) {
|
|
if (setMode && updateFields.contains(SetAttrField.MODE)) {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("set new mode:" + newAttr.getMode());
|
|
|
|
|
|
+ LOG.debug("set new mode: " + newAttr.getMode());
|
|
}
|
|
}
|
|
dfsClient.setPermission(fileIdPath,
|
|
dfsClient.setPermission(fileIdPath,
|
|
new FsPermission((short) (newAttr.getMode())));
|
|
new FsPermission((short) (newAttr.getMode())));
|
|
@@ -392,7 +391,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
.getMilliSeconds() : -1;
|
|
.getMilliSeconds() : -1;
|
|
if (atime != -1 || mtime != -1) {
|
|
if (atime != -1 || mtime != -1) {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("set atime:" + +atime + " mtime:" + mtime);
|
|
|
|
|
|
+ LOG.debug("set atime: " + +atime + " mtime: " + mtime);
|
|
}
|
|
}
|
|
dfsClient.setTimes(fileIdPath, mtime, atime);
|
|
dfsClient.setTimes(fileIdPath, mtime, atime);
|
|
}
|
|
}
|
|
@@ -424,7 +423,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS SETATTR fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS SETATTR fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -440,7 +439,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpAttr = Nfs3Utils.getFileAttr(dfsClient, fileIdPath, iug);
|
|
preOpAttr = Nfs3Utils.getFileAttr(dfsClient, fileIdPath, iug);
|
|
if (preOpAttr == null) {
|
|
if (preOpAttr == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
response.setStatus(Nfs3Status.NFS3ERR_STALE);
|
|
response.setStatus(Nfs3Status.NFS3ERR_STALE);
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
@@ -511,7 +510,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String fileName = request.getName();
|
|
String fileName = request.getName();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS LOOKUP dir fileId: " + dirHandle.getFileId() + " name: "
|
|
LOG.debug("NFS LOOKUP dir fileId: " + dirHandle.getFileId() + " name: "
|
|
- + fileName + " client:" + remoteAddress);
|
|
|
|
|
|
+ + fileName + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -520,7 +519,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
dirHandle, fileName);
|
|
dirHandle, fileName);
|
|
if (postOpObjAttr == null) {
|
|
if (postOpObjAttr == null) {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS LOOKUP fileId: " + dirHandle.getFileId() + " name:"
|
|
|
|
|
|
+ LOG.debug("NFS LOOKUP fileId: " + dirHandle.getFileId() + " name: "
|
|
+ fileName + " does not exist");
|
|
+ fileName + " does not exist");
|
|
}
|
|
}
|
|
Nfs3FileAttributes postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
Nfs3FileAttributes postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
@@ -532,7 +531,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
Nfs3FileAttributes postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
dirFileIdPath, iug);
|
|
dirFileIdPath, iug);
|
|
if (postOpDirAttr == null) {
|
|
if (postOpDirAttr == null) {
|
|
- LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for dir fileId: " + dirHandle.getFileId());
|
|
return new LOOKUP3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new LOOKUP3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
FileHandle fileHandle = new FileHandle(postOpObjAttr.getFileId());
|
|
FileHandle fileHandle = new FileHandle(postOpObjAttr.getFileId());
|
|
@@ -579,7 +578,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes attrs;
|
|
Nfs3FileAttributes attrs;
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS ACCESS fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS ACCESS fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -588,7 +587,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
attrs = writeManager.getFileAttr(dfsClient, handle, iug);
|
|
attrs = writeManager.getFileAttr(dfsClient, handle, iug);
|
|
|
|
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
- LOG.error("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.error("Can't get path for fileId: " + handle.getFileId());
|
|
return new ACCESS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new ACCESS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
int access = Nfs3Utils.getAccessRightsForUserGroup(
|
|
int access = Nfs3Utils.getAccessRightsForUserGroup(
|
|
@@ -646,7 +645,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS READLINK fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS READLINK fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -657,15 +656,15 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes postOpAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
Nfs3FileAttributes postOpAttr = Nfs3Utils.getFileAttr(dfsClient,
|
|
fileIdPath, iug);
|
|
fileIdPath, iug);
|
|
if (postOpAttr == null) {
|
|
if (postOpAttr == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
if (postOpAttr.getType() != NfsFileType.NFSLNK.toValue()) {
|
|
if (postOpAttr.getType() != NfsFileType.NFSLNK.toValue()) {
|
|
- LOG.error("Not a symlink, fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.error("Not a symlink, fileId: " + handle.getFileId());
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
if (target == null) {
|
|
if (target == null) {
|
|
- LOG.error("Symlink target should not be null, fileId:"
|
|
|
|
|
|
+ LOG.error("Symlink target should not be null, fileId: "
|
|
+ handle.getFileId());
|
|
+ handle.getFileId());
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_SERVERFAULT);
|
|
return new READLINK3Response(Nfs3Status.NFS3ERR_SERVERFAULT);
|
|
}
|
|
}
|
|
@@ -726,7 +725,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS READ fileId: " + handle.getFileId() + " offset: " + offset
|
|
LOG.debug("NFS READ fileId: " + handle.getFileId() + " offset: " + offset
|
|
- + " count: " + count + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " count: " + count + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
Nfs3FileAttributes attrs;
|
|
Nfs3FileAttributes attrs;
|
|
@@ -739,13 +738,13 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3Utils.getFileIdPath(handle), iug);
|
|
Nfs3Utils.getFileIdPath(handle), iug);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("Get error accessing file, fileId:" + handle.getFileId(), e);
|
|
|
|
|
|
+ LOG.debug("Get error accessing file, fileId: " + handle.getFileId(), e);
|
|
}
|
|
}
|
|
return new READ3Response(Nfs3Status.NFS3ERR_IO);
|
|
return new READ3Response(Nfs3Status.NFS3ERR_IO);
|
|
}
|
|
}
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.debug("Can't get path for fileId: " + handle.getFileId());
|
|
}
|
|
}
|
|
return new READ3Response(Nfs3Status.NFS3ERR_NOENT);
|
|
return new READ3Response(Nfs3Status.NFS3ERR_NOENT);
|
|
}
|
|
}
|
|
@@ -806,8 +805,9 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
attrs = Nfs3Utils.getFileAttr(dfsClient, Nfs3Utils.getFileIdPath(handle),
|
|
attrs = Nfs3Utils.getFileAttr(dfsClient, Nfs3Utils.getFileIdPath(handle),
|
|
iug);
|
|
iug);
|
|
if (readCount < count) {
|
|
if (readCount < count) {
|
|
- LOG.info("Partical read. Asked offset:" + offset + " count:" + count
|
|
|
|
- + " and read back:" + readCount + "file size:" + attrs.getSize());
|
|
|
|
|
|
+ LOG.info("Partical read. Asked offset: " + offset + " count: " + count
|
|
|
|
+ + " and read back: " + readCount + " file size: "
|
|
|
|
+ + attrs.getSize());
|
|
}
|
|
}
|
|
// HDFS returns -1 for read beyond file size.
|
|
// HDFS returns -1 for read beyond file size.
|
|
if (readCount < 0) {
|
|
if (readCount < 0) {
|
|
@@ -866,15 +866,15 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS WRITE fileId: " + handle.getFileId() + " offset: "
|
|
LOG.debug("NFS WRITE fileId: " + handle.getFileId() + " offset: "
|
|
- + offset + " length:" + count + " stableHow:" + stableHow.getValue()
|
|
|
|
- + " xid:" + xid + " client:" + remoteAddress);
|
|
|
|
|
|
+ + offset + " length: " + count + " stableHow: " + stableHow.getValue()
|
|
|
|
+ + " xid: " + xid + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
Nfs3FileAttributes preOpAttr = null;
|
|
Nfs3FileAttributes preOpAttr = null;
|
|
try {
|
|
try {
|
|
preOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
|
|
preOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
|
|
if (preOpAttr == null) {
|
|
if (preOpAttr == null) {
|
|
- LOG.error("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.error("Can't get path for fileId: " + handle.getFileId());
|
|
return new WRITE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new WRITE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -885,7 +885,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
}
|
|
}
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("requesed offset=" + offset + " and current filesize="
|
|
|
|
|
|
+ LOG.debug("requested offset=" + offset + " and current filesize="
|
|
+ preOpAttr.getSize());
|
|
+ preOpAttr.getSize());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -940,7 +940,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String fileName = request.getName();
|
|
String fileName = request.getName();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS CREATE dir fileId: " + dirHandle.getFileId()
|
|
LOG.debug("NFS CREATE dir fileId: " + dirHandle.getFileId()
|
|
- + " filename: " + fileName + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " filename: " + fileName + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
int createMode = request.getMode();
|
|
int createMode = request.getMode();
|
|
@@ -948,7 +948,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
&& request.getObjAttr().getUpdateFields().contains(SetAttrField.SIZE)
|
|
&& request.getObjAttr().getUpdateFields().contains(SetAttrField.SIZE)
|
|
&& request.getObjAttr().getSize() != 0) {
|
|
&& request.getObjAttr().getSize() != 0) {
|
|
LOG.error("Setting file size is not supported when creating file: "
|
|
LOG.error("Setting file size is not supported when creating file: "
|
|
- + fileName + " dir fileId:" + dirHandle.getFileId());
|
|
|
|
|
|
+ + fileName + " dir fileId: " + dirHandle.getFileId());
|
|
return new CREATE3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new CREATE3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -961,7 +961,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (preOpDirAttr == null) {
|
|
if (preOpDirAttr == null) {
|
|
- LOG.error("Can't get path for dirHandle:" + dirHandle);
|
|
|
|
|
|
+ LOG.error("Can't get path for dirHandle: " + dirHandle);
|
|
return new CREATE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new CREATE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -985,7 +985,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
fos = dfsClient.createWrappedOutputStream(
|
|
fos = dfsClient.createWrappedOutputStream(
|
|
dfsClient.create(fileIdPath, permission, flag, false, replication,
|
|
dfsClient.create(fileIdPath, permission, flag, false, replication,
|
|
blockSize, null, bufferSize, null),
|
|
blockSize, null, bufferSize, null),
|
|
- statistics);
|
|
|
|
|
|
+ null);
|
|
|
|
|
|
if ((createMode == Nfs3Constant.CREATE_UNCHECKED)
|
|
if ((createMode == Nfs3Constant.CREATE_UNCHECKED)
|
|
|| (createMode == Nfs3Constant.CREATE_GUARDED)) {
|
|
|| (createMode == Nfs3Constant.CREATE_GUARDED)) {
|
|
@@ -1013,7 +1013,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
fos = null;
|
|
fos = null;
|
|
} else {
|
|
} else {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("Opened stream for file:" + fileName + ", fileId:"
|
|
|
|
|
|
+ LOG.debug("Opened stream for file: " + fileName + ", fileId: "
|
|
+ fileHandle.getFileId());
|
|
+ fileHandle.getFileId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1024,7 +1024,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
fos.close();
|
|
fos.close();
|
|
} catch (IOException e1) {
|
|
} catch (IOException e1) {
|
|
- LOG.error("Can't close stream for dirFileId:" + dirHandle.getFileId()
|
|
|
|
|
|
+ LOG.error("Can't close stream for dirFileId: " + dirHandle.getFileId()
|
|
+ " filename: " + fileName, e1);
|
|
+ " filename: " + fileName, e1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1033,7 +1033,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
dirWcc = Nfs3Utils.createWccData(Nfs3Utils.getWccAttr(preOpDirAttr),
|
|
dirWcc = Nfs3Utils.createWccData(Nfs3Utils.getWccAttr(preOpDirAttr),
|
|
dfsClient, dirFileIdPath, iug);
|
|
dfsClient, dirFileIdPath, iug);
|
|
} catch (IOException e1) {
|
|
} catch (IOException e1) {
|
|
- LOG.error("Can't get postOpDirAttr for dirFileId:"
|
|
|
|
|
|
+ LOG.error("Can't get postOpDirAttr for dirFileId: "
|
|
+ dirHandle.getFileId(), e1);
|
|
+ dirHandle.getFileId(), e1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1073,7 +1073,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String fileName = request.getName();
|
|
String fileName = request.getName();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS MKDIR dirId: " + dirHandle.getFileId() + " filename: "
|
|
LOG.debug("NFS MKDIR dirId: " + dirHandle.getFileId() + " filename: "
|
|
- + fileName + " client:" + remoteAddress);
|
|
|
|
|
|
+ + fileName + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
if (request.getObjAttr().getUpdateFields().contains(SetAttrField.SIZE)) {
|
|
if (request.getObjAttr().getUpdateFields().contains(SetAttrField.SIZE)) {
|
|
@@ -1090,7 +1090,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (preOpDirAttr == null) {
|
|
if (preOpDirAttr == null) {
|
|
- LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for dir fileId: " + dirHandle.getFileId());
|
|
return new MKDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new MKDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1173,7 +1173,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String fileName = request.getName();
|
|
String fileName = request.getName();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS REMOVE dir fileId: " + dirHandle.getFileId()
|
|
LOG.debug("NFS REMOVE dir fileId: " + dirHandle.getFileId()
|
|
- + " fileName: " + fileName + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " fileName: " + fileName + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
|
|
@@ -1182,7 +1182,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (preOpDirAttr == null) {
|
|
if (preOpDirAttr == null) {
|
|
- LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for dir fileId: " + dirHandle.getFileId());
|
|
return new REMOVE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new REMOVE3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1254,7 +1254,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS RMDIR dir fileId: " + dirHandle.getFileId()
|
|
LOG.debug("NFS RMDIR dir fileId: " + dirHandle.getFileId()
|
|
- + " fileName: " + fileName + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " fileName: " + fileName + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(dirHandle);
|
|
@@ -1263,7 +1263,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
preOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (preOpDirAttr == null) {
|
|
if (preOpDirAttr == null) {
|
|
- LOG.info("Can't get path for dir fileId:" + dirHandle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for dir fileId: " + dirHandle.getFileId());
|
|
return new RMDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new RMDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1341,7 +1341,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String toName = request.getToName();
|
|
String toName = request.getToName();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS RENAME from: " + fromHandle.getFileId() + "/" + fromName
|
|
LOG.debug("NFS RENAME from: " + fromHandle.getFileId() + "/" + fromName
|
|
- + " to: " + toHandle.getFileId() + "/" + toName + " client:"
|
|
|
|
|
|
+ + " to: " + toHandle.getFileId() + "/" + toName + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1354,14 +1354,14 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
fromPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, fromDirFileIdPath, iug);
|
|
fromPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, fromDirFileIdPath, iug);
|
|
if (fromPreOpAttr == null) {
|
|
if (fromPreOpAttr == null) {
|
|
- LOG.info("Can't get path for fromHandle fileId:"
|
|
|
|
|
|
+ LOG.info("Can't get path for fromHandle fileId: "
|
|
+ fromHandle.getFileId());
|
|
+ fromHandle.getFileId());
|
|
return new RENAME3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new RENAME3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
toPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, toDirFileIdPath, iug);
|
|
toPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, toDirFileIdPath, iug);
|
|
if (toPreOpAttr == null) {
|
|
if (toPreOpAttr == null) {
|
|
- LOG.info("Can't get path for toHandle fileId:" + toHandle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for toHandle fileId: " + toHandle.getFileId());
|
|
return new RENAME3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new RENAME3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1441,7 +1441,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String linkIdPath = linkDirIdPath + "/" + name;
|
|
String linkIdPath = linkDirIdPath + "/" + name;
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS SYMLINK, target: " + symData + " link: " + linkIdPath
|
|
LOG.debug("NFS SYMLINK, target: " + symData + " link: " + linkIdPath
|
|
- + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -1463,7 +1463,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
objAttr.getFileId()), objAttr, dirWcc);
|
|
objAttr.getFileId()), objAttr, dirWcc);
|
|
|
|
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
- LOG.warn("Exception:" + e);
|
|
|
|
|
|
+ LOG.warn("Exception: " + e);
|
|
int status = mapErrorStatus(e);
|
|
int status = mapErrorStatus(e);
|
|
response.setStatus(status);
|
|
response.setStatus(status);
|
|
return response;
|
|
return response;
|
|
@@ -1529,18 +1529,18 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
long cookie = request.getCookie();
|
|
long cookie = request.getCookie();
|
|
if (cookie < 0) {
|
|
if (cookie < 0) {
|
|
- LOG.error("Invalid READDIR request, with negitve cookie:" + cookie);
|
|
|
|
|
|
+ LOG.error("Invalid READDIR request, with negative cookie: " + cookie);
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
long count = request.getCount();
|
|
long count = request.getCount();
|
|
if (count <= 0) {
|
|
if (count <= 0) {
|
|
- LOG.info("Nonpositive count in invalid READDIR request:" + count);
|
|
|
|
|
|
+ LOG.info("Nonpositive count in invalid READDIR request: " + count);
|
|
return new READDIR3Response(Nfs3Status.NFS3_OK);
|
|
return new READDIR3Response(Nfs3Status.NFS3_OK);
|
|
}
|
|
}
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS READDIR fileId: " + handle.getFileId() + " cookie: "
|
|
LOG.debug("NFS READDIR fileId: " + handle.getFileId() + " cookie: "
|
|
- + cookie + " count: " + count + " client:" + remoteAddress);
|
|
|
|
|
|
+ + cookie + " count: " + count + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
HdfsFileStatus dirStatus;
|
|
HdfsFileStatus dirStatus;
|
|
@@ -1551,11 +1551,11 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(handle);
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(handle);
|
|
dirStatus = dfsClient.getFileInfo(dirFileIdPath);
|
|
dirStatus = dfsClient.getFileInfo(dirFileIdPath);
|
|
if (dirStatus == null) {
|
|
if (dirStatus == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
if (!dirStatus.isDir()) {
|
|
if (!dirStatus.isDir()) {
|
|
- LOG.error("Can't readdir for regular file, fileId:"
|
|
|
|
|
|
+ LOG.error("Can't readdir for regular file, fileId: "
|
|
+ handle.getFileId());
|
|
+ handle.getFileId());
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_NOTDIR);
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_NOTDIR);
|
|
}
|
|
}
|
|
@@ -1588,7 +1588,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
if (dotdotStatus == null) {
|
|
if (dotdotStatus == null) {
|
|
// This should not happen
|
|
// This should not happen
|
|
- throw new IOException("Can't get path for handle path:"
|
|
|
|
|
|
+ throw new IOException("Can't get path for handle path: "
|
|
+ dotdotFileIdPath);
|
|
+ dotdotFileIdPath);
|
|
}
|
|
}
|
|
dotdotFileId = dotdotStatus.getFileId();
|
|
dotdotFileId = dotdotStatus.getFileId();
|
|
@@ -1606,7 +1606,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
dlisting = listPaths(dfsClient, dirFileIdPath, startAfter);
|
|
dlisting = listPaths(dfsClient, dirFileIdPath, startAfter);
|
|
postOpAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
postOpAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (postOpAttr == null) {
|
|
if (postOpAttr == null) {
|
|
- LOG.error("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.error("Can't get path for fileId: " + handle.getFileId());
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new READDIR3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
@@ -1687,24 +1687,24 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
long cookie = request.getCookie();
|
|
long cookie = request.getCookie();
|
|
if (cookie < 0) {
|
|
if (cookie < 0) {
|
|
- LOG.error("Invalid READDIRPLUS request, with negitve cookie:" + cookie);
|
|
|
|
|
|
+ LOG.error("Invalid READDIRPLUS request, with negative cookie: " + cookie);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
long dirCount = request.getDirCount();
|
|
long dirCount = request.getDirCount();
|
|
if (dirCount <= 0) {
|
|
if (dirCount <= 0) {
|
|
- LOG.info("Nonpositive dircount in invalid READDIRPLUS request:" + dirCount);
|
|
|
|
|
|
+ LOG.info("Nonpositive dircount in invalid READDIRPLUS request: " + dirCount);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
int maxCount = request.getMaxCount();
|
|
int maxCount = request.getMaxCount();
|
|
if (maxCount <= 0) {
|
|
if (maxCount <= 0) {
|
|
- LOG.info("Nonpositive maxcount in invalid READDIRPLUS request:" + maxCount);
|
|
|
|
|
|
+ LOG.info("Nonpositive maxcount in invalid READDIRPLUS request: " + maxCount);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_INVAL);
|
|
}
|
|
}
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS READDIRPLUS fileId: " + handle.getFileId() + " cookie: "
|
|
LOG.debug("NFS READDIRPLUS fileId: " + handle.getFileId() + " cookie: "
|
|
+ cookie + " dirCount: " + dirCount + " maxCount: " + maxCount
|
|
+ cookie + " dirCount: " + dirCount + " maxCount: " + maxCount
|
|
- + " client:" + remoteAddress);
|
|
|
|
|
|
+ + " client: " + remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
HdfsFileStatus dirStatus;
|
|
HdfsFileStatus dirStatus;
|
|
@@ -1716,11 +1716,11 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(handle);
|
|
String dirFileIdPath = Nfs3Utils.getFileIdPath(handle);
|
|
dirStatus = dfsClient.getFileInfo(dirFileIdPath);
|
|
dirStatus = dfsClient.getFileInfo(dirFileIdPath);
|
|
if (dirStatus == null) {
|
|
if (dirStatus == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
if (!dirStatus.isDir()) {
|
|
if (!dirStatus.isDir()) {
|
|
- LOG.error("Can't readdirplus for regular file, fileId:"
|
|
|
|
|
|
+ LOG.error("Can't readdirplus for regular file, fileId: "
|
|
+ handle.getFileId());
|
|
+ handle.getFileId());
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_NOTDIR);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_NOTDIR);
|
|
}
|
|
}
|
|
@@ -1751,7 +1751,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
if (dotdotStatus == null) {
|
|
if (dotdotStatus == null) {
|
|
// This should not happen
|
|
// This should not happen
|
|
- throw new IOException("Can't get path for handle path:"
|
|
|
|
|
|
+ throw new IOException("Can't get path for handle path: "
|
|
+ dotdotFileIdPath);
|
|
+ dotdotFileIdPath);
|
|
}
|
|
}
|
|
dotdotFileId = dotdotStatus.getFileId();
|
|
dotdotFileId = dotdotStatus.getFileId();
|
|
@@ -1769,7 +1769,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
dlisting = listPaths(dfsClient, dirFileIdPath, startAfter);
|
|
dlisting = listPaths(dfsClient, dirFileIdPath, startAfter);
|
|
postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
|
|
if (postOpDirAttr == null) {
|
|
if (postOpDirAttr == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new READDIRPLUS3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
@@ -1801,7 +1801,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
attr = writeManager.getFileAttr(dfsClient, childHandle, iug);
|
|
attr = writeManager.getFileAttr(dfsClient, childHandle, iug);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
- LOG.error("Can't get file attributes for fileId:" + fileId, e);
|
|
|
|
|
|
+ LOG.error("Can't get file attributes for fileId: " + fileId, e);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
entries[i] = new READDIRPLUS3Response.EntryPlus3(fileId,
|
|
entries[i] = new READDIRPLUS3Response.EntryPlus3(fileId,
|
|
@@ -1818,7 +1818,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
attr = writeManager.getFileAttr(dfsClient, childHandle, iug);
|
|
attr = writeManager.getFileAttr(dfsClient, childHandle, iug);
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
- LOG.error("Can't get file attributes for fileId:" + fileId, e);
|
|
|
|
|
|
+ LOG.error("Can't get file attributes for fileId: " + fileId, e);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
entries[i] = new READDIRPLUS3Response.EntryPlus3(fileId,
|
|
entries[i] = new READDIRPLUS3Response.EntryPlus3(fileId,
|
|
@@ -1863,7 +1863,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS FSSTAT fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS FSSTAT fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1875,7 +1875,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes attrs = writeManager.getFileAttr(dfsClient, handle,
|
|
Nfs3FileAttributes attrs = writeManager.getFileAttr(dfsClient, handle,
|
|
iug);
|
|
iug);
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new FSSTAT3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new FSSTAT3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1938,7 +1938,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
|
|
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS FSINFO fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS FSINFO fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1956,7 +1956,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes attrs = Nfs3Utils.getFileAttr(dfsClient,
|
|
Nfs3FileAttributes attrs = Nfs3Utils.getFileAttr(dfsClient,
|
|
Nfs3Utils.getFileIdPath(handle), iug);
|
|
Nfs3Utils.getFileIdPath(handle), iug);
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new FSINFO3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new FSINFO3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2005,7 +2005,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
Nfs3FileAttributes attrs;
|
|
Nfs3FileAttributes attrs;
|
|
|
|
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
- LOG.debug("NFS PATHCONF fileId: " + handle.getFileId() + " client:"
|
|
|
|
|
|
+ LOG.debug("NFS PATHCONF fileId: " + handle.getFileId() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2013,7 +2013,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
attrs = Nfs3Utils.getFileAttr(dfsClient, Nfs3Utils.getFileIdPath(handle),
|
|
attrs = Nfs3Utils.getFileAttr(dfsClient, Nfs3Utils.getFileIdPath(handle),
|
|
iug);
|
|
iug);
|
|
if (attrs == null) {
|
|
if (attrs == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new PATHCONF3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new PATHCONF3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2057,7 +2057,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
FileHandle handle = request.getHandle();
|
|
FileHandle handle = request.getHandle();
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("NFS COMMIT fileId: " + handle.getFileId() + " offset="
|
|
LOG.debug("NFS COMMIT fileId: " + handle.getFileId() + " offset="
|
|
- + request.getOffset() + " count=" + request.getCount() + " client:"
|
|
|
|
|
|
+ + request.getOffset() + " count=" + request.getCount() + " client: "
|
|
+ remoteAddress);
|
|
+ remoteAddress);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2066,7 +2066,7 @@ public class RpcProgramNfs3 extends RpcProgram implements Nfs3Interface {
|
|
try {
|
|
try {
|
|
preOpAttr = Nfs3Utils.getFileAttr(dfsClient, fileIdPath, iug);
|
|
preOpAttr = Nfs3Utils.getFileAttr(dfsClient, fileIdPath, iug);
|
|
if (preOpAttr == null) {
|
|
if (preOpAttr == null) {
|
|
- LOG.info("Can't get path for fileId:" + handle.getFileId());
|
|
|
|
|
|
+ LOG.info("Can't get path for fileId: " + handle.getFileId());
|
|
return new COMMIT3Response(Nfs3Status.NFS3ERR_STALE);
|
|
return new COMMIT3Response(Nfs3Status.NFS3ERR_STALE);
|
|
}
|
|
}
|
|
|
|
|