DragonFly hammer List (threaded) for 2009-06
DragonFly BSD
DragonFly hammer List (threaded) for 2009-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Resolving data_offset and data_len


To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
From: Daniel Lorch <daniel.lorch@xxxxxxx>
Date: Wed, 03 Jun 2009 22:23:59 +0200

Hello,

>     Reading the data via the B-Tree is a bit confusing because data_offset 
>     in a B-Tree element is *NOT* the base offset for the data block but
>     instead the ending offset for the data block.  i.e. the offset in
>     the file for the data is actually (cursor.leaf->data_offset -
>     cursor.leaf->data_len).

What does cursor.leaf->data_len represent? Is it the data record's
length in KB? (so it would be either 16K or 64K).

Does (cursor.leaf->data_offset - cursor.leaf->data_len) represents a
*byte offset* from the beginning of the block device? Or is it a
relative value to some other value?

I am trying to figure out how hammer_vop_strategy_read() works. I have
used `xxd' to get a readable representation of my disk and I scrolled
down to the value indicated by `disk_offset', but the data I was looking
for wasn't there.

Daniel



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]