Re: Physical address offset of the inline extent

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

 




On 18.06.20 г. 17:53 ч., Rebraca Dejan (BSOT/PJ-ES1-Bg) wrote:
> Hi Qu,
> 
> I've read this:
> https://btrfs.wiki.kernel.org/index.php/Data_Structures#btrfs_key_.2F_btrfs_disk_key
> where key.objectid of EXTENT_ITEM contains the starting byte offset of the extent it describes and key.offset of EXTENT_ITEM stores the size of the extent the item describes.
> 
> From your dump:
> item 6 key (257 EXTENT_DATA 0) itemoff 13794 itemsize 2069
> 
> itremoff = 13794
> This is the offset relative to tree block or tree leaf, right?
> 

This is the offset relative to the tree leaf block, which is 5324800.
HOwever this address 5324800 is within btrfs' logical address space and
not physical space. Then you need to map this logical address to a
particular btrfs block group which then has to be mapped to a chunk,
which then has to be mapped to a physical device extent to eventually
arrive at the physical location of this data.

Before proceeding with this I strongly advise you spend time getting
familiar with
https://github.com/btrfs/btrfs-dev-docs/blob/master/tree-items.txt and
https://github.com/btrfs/btrfs-dev-docs/blob/master/trees.txt

<snip>



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux