existing.getLatestSnapshotId()); if (!added) { updateCountNoQuotaCheck(existing, pos, counts.negation()); return null; } else {
fsd.writeLock(); try { fsd.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { fsd.writeUnlock();
fsd.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { fsd.writeUnlock();
/** Remove an inode at index pos from the namespace. * Its ancestors are stored at [0, pos-1]. * Count of each ancestor with quota is also updated. * Return the removed node; null if the removal fails. */ private INode removeChild(INode[] pathComponents, int pos) { INode removedNode = ((INodeDirectory)pathComponents[pos-1]).removeChild(pathComponents[pos]); if (removedNode != null) { INode.DirCounts counts = new INode.DirCounts(); removedNode.spaceConsumedInTree(counts); updateCountNoQuotaCheck(pathComponents, pos, -counts.getNsCount(), -counts.getDsCount()); } return removedNode; }
latestSnapshot, collectedBlocks, removedINodes); removed = counts.getNameSpace(); fsd.updateCountNoQuotaCheck(iip, iip.length() -1, counts.negation());
added = parent.addChild(inode, true, existing.getLatestSnapshotId()); } catch (QuotaExceededException e) { updateCountNoQuotaCheck(existing, pos, counts.negation()); throw e; updateCountNoQuotaCheck(existing, pos, counts.negation()); return null; } else {
dir.writeLock(); try { dir.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { dir.writeUnlock();
added = parent.addChild(inode, true, existing.getLatestSnapshotId()); } catch (QuotaExceededException e) { updateCountNoQuotaCheck(existing, pos, counts.negation()); throw e; updateCountNoQuotaCheck(existing, pos, counts.negation()); return null; } else {
dir.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { dir.writeUnlock();
dir.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { dir.writeUnlock();
latestSnapshot, collectedBlocks, removedINodes); removed = counts.getNameSpace(); fsd.updateCountNoQuotaCheck(iip, iip.length() -1, counts.negation());
dir.writeLock(); try { dir.updateCountNoQuotaCheck(iip, iip.length() - 1, delta); } finally { dir.writeUnlock();