All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: 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: Tue, 11 Apr 2017 22:18:33 -0600	[thread overview]
Message-ID: <CAJCQCtTyNUx-P2aPNBE0x2W01qUfrBcHyA-46frM4X+suKMxrw@mail.gmail.com> (raw)
In-Reply-To: <20170411210023.vfqck3h6nepdow3z@angband.pl>

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.

-- 
Chris Murphy

  reply	other threads:[~2017-04-12  4:18 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 [this message]
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
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=CAJCQCtTyNUx-P2aPNBE0x2W01qUfrBcHyA-46frM4X+suKMxrw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=ahassani@chromium.org \
    --cc=kilobyte@angband.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.