From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>,
Chris Murphy <lists@colorremedies.com>,
Adam Borowski <kilobyte@angband.pl>
Cc: Amin Hassani <ahassani@chromium.org>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Btrfs disk layout question
Date: Wed, 12 Apr 2017 12:56:34 -0400 [thread overview]
Message-ID: <8bc0e7b3-8df9-0def-de34-1a774d361f35@gmail.com> (raw)
In-Reply-To: <ec5a00c8-5eb8-b7fa-c1e5-5eb72cb3512c@gmail.com>
On 2017-04-12 12:44, Andrei Borzenkov wrote:
> 12.04.2017 14:20, Austin S. Hemmelgarn пишет:
>> On 2017-04-12 00:18, Chris Murphy wrote:
>>> On Tue, Apr 11, 2017 at 3:00 PM, Adam Borowski <kilobyte@angband.pl>
>>> wrote:
>>>> On Tue, Apr 11, 2017 at 12:15:32PM -0700, Amin Hassani wrote:
>>>>> I am working on a project with Btrfs and I was wondering if there is
>>>>> any way to see the disk layout of the btrfs image. Let's assume I have
>>>>> a read-only btrfs image with compression on and only using one disk
>>>>> (no raid or anything). Is it possible to get a set of offset-lengths
>>>>> for each file
>>>>
>>>> While btrfs-specific ioctls give more information, you might want to
>>>> look at
>>>> FIEMAP (Documentation/filesystems/fiemap.txt) as it works on most
>>>> filesystems, not just btrfs. One interface to FIEMAP is provided in
>>>> "/usr/sbin/filefrag -v".
>>>
>>> Good idea. Although, on Btrfs I'm pretty sure it reports the Btrfs
>>> (internal) logical addressing; not the actual physical sector address
>>> on the drive. So it depends on what the original poster is trying to
>>> discover.
>>>
>> That said, there is a tool to translate that back, and depending on how
>> detailed you want to get, that may be more efficient than debug tree.
>
> Could you give pointer to this tool? I use filefrag on bootinfoscript to
> display physical disk offset of files of interest to bootloader. I was
> not aware it shows logical offset which makes it kinda pointless.
>
Looking again, I think I was thinking of `btrfs inspect-internal
logical-resolve`, which actually is more like a reverse fiemap (you give
it a logical address, and it spits out paths to all the files that
include that logical address), so such a tool may not actually exist (at
least, not in the standard tools).
next prev parent reply other threads:[~2017-04-12 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 19:15 Btrfs disk layout question Amin Hassani
2017-04-11 20:43 ` Chris Murphy
2017-04-11 21:00 ` Adam Borowski
2017-04-12 4:18 ` Chris Murphy
2017-04-12 11:20 ` Austin S. Hemmelgarn
2017-04-12 16:44 ` Andrei Borzenkov
2017-04-12 16:50 ` Amin Hassani
2017-04-12 16:56 ` Austin S. Hemmelgarn [this message]
2017-04-12 17:21 ` Chris Murphy
2017-04-13 3:26 ` Andrei Borzenkov
2017-04-15 6:14 ` Andrei Borzenkov
2017-04-15 17:06 ` Chris Murphy
2017-04-12 17:25 ` Hans van Kranenburg
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=8bc0e7b3-8df9-0def-de34-1a774d361f35@gmail.com \
--to=ahferroin7@gmail.com \
--cc=ahassani@chromium.org \
--cc=arvidjaar@gmail.com \
--cc=kilobyte@angband.pl \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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;
as well as URLs for NNTP newsgroup(s).