Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Bug or feature? logical_to_ino skips inodes with offset mismatch
Date: Sun, 5 Feb 2017 23:45:51 +0100	[thread overview]
Message-ID: <73a4f8c9-8878-5bd0-8e0a-e9b2bf6a3428@mendix.com> (raw)
In-Reply-To: <9eb6d42e-a44b-c427-ed37-1eaa67944b3f@mendix.com>

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

      reply	other threads:[~2017-02-05 22:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 21:54 Bug or feature? logical_to_ino skips inodes with offset mismatch Hans van Kranenburg
2017-02-05 22:45 ` Hans van Kranenburg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73a4f8c9-8878-5bd0-8e0a-e9b2bf6a3428@mendix.com \
    --to=hans.van.kranenburg@mendix.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox