Re: Bug or feature? logical_to_ino skips inodes with offset mismatch

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

 



On 02/05/2017 10:54 PM, Hans van Kranenburg wrote:
> I was playing around with logical_to_ino and also implemented calling
> ino_lookup today to create a program that will print all data extents in
> a block group, and their related inodes and at least one filename per inode.
> 
> https://github.com/knorrie/python-btrfs/commits/develop
> See "examples: show filenames for data extents"
> 
> I ran into the following behaviour of logical_to_ino:
> 
> If the offset value in a backreference of an extent_item does not match
> the offset value of the extent_data object in the fs tree,
> logical_to_ino will skip the inode that uses data from the extent, and
> not report it.

Ah, wait... To answer my own question... The reason is probably because
the data at that exact place is not actually in use.

-# btrfs inspect-internal logical-resolve 336064511 . (+ 16KiB - 1)
-# btrfs inspect-internal logical-resolve 336064512 . (+ 16KiB)
./vmlinuz-4.9.0-1-amd64
-# btrfs inspect-internal logical-resolve 336064513 .
./vmlinuz-4.9.0-1-amd64

Jups... Makes sense.

But, it also means that I cannot use logical_to_ino as a helper to
expand shared backrefs to actual inode info... Meh.

-- 
Hans van Kranenburg
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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