/// <summary>Update the length for the last block</summary> /// <param name="lastBlockLength">The length of the last block reported from client</param> /// <exception cref="System.IO.IOException"/> internal virtual void UpdateLengthOfLastBlock(INodeFile f, long lastBlockLength) { BlockInfoContiguous lastBlock = f.GetLastBlock(); System.Diagnostics.Debug.Assert((lastBlock != null), "The last block for path " + f.GetFullPathName() + " is null when updating its length"); System.Diagnostics.Debug.Assert((lastBlock is BlockInfoContiguousUnderConstruction ), "The last block for path " + f.GetFullPathName() + " is not a BlockInfoUnderConstruction when updating its length" ); lastBlock.SetNumBytes(lastBlockLength); }