public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { source_cinfo = new change_info4(xdr); target_cinfo = new change_info4(xdr); }
public change_info4(XdrDecodingStream xdr) throws OncRpcException, IOException { xdrDecode(xdr); }
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { cinfo = new change_info4(xdr); }
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { cinfo.xdrEncode(xdr); }
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { cinfo = new change_info4(xdr); }
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { cinfo.xdrEncode(xdr); }
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { cinfo = new change_info4(xdr); attrset = new bitmap4(xdr); }
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { cinfo.xdrEncode(xdr); attrset.xdrEncode(xdr); }
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { stateid = new stateid4(xdr); cinfo = new change_info4(xdr); rflags = new uint32_t(xdr); attrset = new bitmap4(xdr); delegation = new open_delegation4(xdr); }
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { stateid.xdrEncode(xdr); cinfo.xdrEncode(xdr); rflags.xdrEncode(xdr); attrset.xdrEncode(xdr); delegation.xdrEncode(xdr); }
@Override public void process(CompoundContext context, nfs_resop4 result) throws ChimeraNFSException, IOException { final REMOVE4res res = result.opremove; res.status = nfsstat.NFS_OK; res.resok4 = new REMOVE4resok(); res.resok4.cinfo = new change_info4(); res.resok4.cinfo.atomic = true; Inode parentInode = context.currentInode(); Stat stat = context.getFs().getattr(parentInode); if (stat.type() != Stat.Type.DIRECTORY) { throw new NotDirException(); } String name = NameFilter.convertName(_args.opremove.target.value); _log.debug("REMOVE: {} : {}", parentInode, name); res.resok4.cinfo.before = new changeid4(stat.getGeneration()); context.getFs().remove(parentInode, name); res.resok4.cinfo.after = new changeid4(context.getFs().getattr(parentInode).getGeneration()); } }
res.resok4.source_cinfo = new change_info4(); res.resok4.source_cinfo.atomic = true; res.resok4.target_cinfo = new change_info4(); res.resok4.target_cinfo.atomic = true;
res.resok4.delegation = new open_delegation4(); res.resok4.delegation.delegation_type = open_delegation_type4.OPEN_DELEGATE_NONE; res.resok4.cinfo = new change_info4(); res.resok4.cinfo.atomic = true;
@Override public void process(CompoundContext context, nfs_resop4 result) throws ChimeraNFSException, IOException { String newName = NameFilter.convertName(_args.oplink.newname.value); result.oplink.resok4 = new LINK4resok(); result.oplink.resok4.cinfo = new change_info4(); result.oplink.resok4.cinfo.atomic = true; Inode parent = context.currentInode(); Stat parentDirStat = context.getFs().getattr(parent); Stat inodeStat = context.getFs().getattr(context.savedInode()); if (parentDirStat.type() != Stat.Type.DIRECTORY) { throw new NotDirException("Can't create a hard-link in non directory object"); } if (inodeStat.type() == Stat.Type.DIRECTORY) { throw new IsDirException("Can't hard-link a directory"); } result.oplink.resok4.cinfo.before = new changeid4(parentDirStat.getGeneration()); context.getFs().link(context.currentInode(), context.savedInode(), newName, context.getSubject()); result.oplink.resok4.cinfo.after = new changeid4(context.getFs().getattr(parent).getGeneration()); result.oplink.status = nfsstat.NFS_OK; } }
res.resok4 = new CREATE4resok(); res.resok4.attrset = appliedAttribytes; res.resok4.cinfo = new change_info4(); res.resok4.cinfo.atomic = true; res.resok4.cinfo.before = new changeid4(stat.getMTime());