/// <exception cref="Org.Apache.Hadoop.Hdfs.Protocol.QuotaExceededException"/> internal virtual void RestoreSource() { // Rename failed - restore src INode oldSrcChild = srcChild; // put it back if (withCount == null) { srcChild.SetLocalName(srcChildName); } else { if (!srcChildIsReference) { // src must be in snapshot // the withCount node will no longer be used thus no need to update // its reference number here srcChild = withCount.GetReferredINode(); srcChild.SetLocalName(srcChildName); } else { withCount.RemoveReference(oldSrcChild.AsReference()); srcChild = new INodeReference.DstReference(srcParent, withCount, srcRefDstSnapshot ); withCount.GetReferredINode().SetLocalName(srcChildName); } } if (isSrcInSnapshot) { srcParent.UndoRename4ScrParent(oldSrcChild.AsReference(), srcChild); } else { // srcParent is not an INodeDirectoryWithSnapshot, we only need to add // the srcChild back fsd.AddLastINodeNoQuotaCheck(srcParentIIP, srcChild); } }