All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	"Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	Adam Borowski <kilobyte@angband.pl>,
	Amin Hassani <ahassani@chromium.org>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Btrfs disk layout question
Date: Sat, 15 Apr 2017 11:06:24 -0600	[thread overview]
Message-ID: <CAJCQCtQ6PxF4Y8xbdJaCRxijG3sTyVTN3tnjctOqNXy8GRWhCQ@mail.gmail.com> (raw)
In-Reply-To: <552552ec-6366-04f2-482f-d93d166081e1@gmail.com>

On Sat, Apr 15, 2017 at 12:14 AM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
> 12.04.2017 20:21, Chris Murphy пишет:
>> btrfs-map-logical is the tool that will convert logical to physical
>> and also give what device it's on; but the device notation is copy 1
>> and copy 2, so you have to infer what device that is, it's not
>> explicit.
>>
>
> Actually I just checked with btrfsprogs 4.5.3 on RAID5 and it does print
> OS device name for each data chunk. It does not show checksum chunk for
> RAID56 though.

There is no checksum chunk. The data csums are in their own tree, and
only data is csum'd. The parity strip is contained within a raid56
chunk but is itself not csum'd.

Another thing that I just thought of might be useful is btrfs-debugfs
which is a python script in btrfs-progs, but typically not packaged.
The -f option pointed at a file will show extents with Btrfs logical
bytenr. So that'd be a way to get all the extents, their addresses and
lengths, to then dump into btrfs-map-logical.

For what it's worth, btrfs-map-logical's physical address it reports
is not device LBA. It's a byte offset on the selected device. So if
the device is a partition, the value is the number of bytes from the
start of that partition.



-- 
Chris Murphy

  reply	other threads:[~2017-04-15 17:06 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
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 [this message]
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=CAJCQCtQ6PxF4Y8xbdJaCRxijG3sTyVTN3tnjctOqNXy8GRWhCQ@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=ahassani@chromium.org \
    --cc=ahferroin7@gmail.com \
    --cc=arvidjaar@gmail.com \
    --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.