From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Zhe Zhang <zhe.zhang.research@gmail.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [Question] disk_bytenr with multiple devices
Date: Fri, 11 Jul 2014 13:23:57 +0800 [thread overview]
Message-ID: <53BF74ED.5010407@cn.fujitsu.com> (raw)
In-Reply-To: <CAMXuLLoeHPkX+Ym9a-HjVv=5ccqx9wo9tkbMLsySmgC=YJxgZQ@mail.gmail.com>
-------- Original Message --------
Subject: [Question] disk_bytenr with multiple devices
From: Zhe Zhang <zhe.zhang.research@gmail.com>
To: linux-btrfs@vger.kernel.org
Date: 2014年07月11日 02:21
> When a btrfs has multiple devices (e.g. /dev/sdb, /dev/sdc), how
> should I interpret disk_bytenr in btrfs_file_extent_item?
>
> Does it depend on the striping config? Say I used raid0, then
> disk_bytenr 0~64K will be on /dev/sdb, and 64K~128K on /dev/sdc?
>
> Thanks,
> Zhe
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
https://btrfs.wiki.kernel.org/index.php/Data_Structures#btrfs_file_extent_item
As you can see in the btrfs wiki,
disk_bytenr is *logical* address in btrfs linear space. Not really on
disk address.
If you really want the address on device, you need to find the chunk
containing the address,
then the stripe in chunk item will show the raid profile and device
address on each device.
Thanks,
Qu
next prev parent reply other threads:[~2014-07-11 5:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 18:21 [Question] disk_bytenr with multiple devices Zhe Zhang
2014-07-11 5:23 ` Qu Wenruo [this message]
2014-07-14 19:44 ` Zhe Zhang
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=53BF74ED.5010407@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zhe.zhang.research@gmail.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 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.