This project has moved and is read-only. For the latest updates, please go here.

bug or my misunderstanding??

Aug 6, 2013 at 12:35 AM
Edited Aug 6, 2013 at 12:36 AM
*************************** in "IndexParser.GetPositionData"

long offset = position - BaseVirtualAddress;
int pageIndex = (int)(offset / m_blockDataLength);

from IndexMapper, we can know that BaseVirtualAddress is actually "position/m_blockDataLength * m_blockDataLength"
so offset is always smaller than m_blockDataLength, so pageIndex is actually always zero.

Is that in purpose???

*************************** in "IndexParser.GetPositionData"

positionData.PhysicalBlockIndex = DataClusterAddress + pageIndex;

what's the unit of DataClusterAddress and pageIndex??

according to my understanding of your codes, DataClusterAddress is the number of blocksize, while pageIndex is the number of "data block length, which equals blocksize-32".

if those variable have different units, how can they be added up??

*************************** in "DiskIoSession.BeginWriteToExistingBlock"
according to your comments, the parameters.
  • blockIndex: the index value of this block
  • indexValue: a value put in the footer of the block designating the index of this block
so what's the difference between those two indices??