From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs_progs: mkfs: match devid order to the stripe index
Date: Tue, 27 Aug 2019 10:02:31 +0800 [thread overview]
Message-ID: <e2ab1be9-8b83-987f-0d88-c1f5547060d4@oracle.com> (raw)
In-Reply-To: <20190703132158.GV20977@twin.jikos.cz>
On 3/7/19 9:21 PM, David Sterba wrote:
> On Fri, Jun 28, 2019 at 10:26:11AM +0800, Anand Jain wrote:
>> At the time mkfs.btrfs the device id and stripe index gets reversed as
>> shown in [1]. This patch helps to keep them in order at the time of
>> mkfs.btrfs. And makes it easier to debug.
>>
>> Before:
>> Stripe 0 is on devid 2; Stipe 1 is on devid 1;
>>
>> ./mkfs.btrfs -fq -draid1 -mraid1 /dev/sdb /dev/sdc && btrfs in dump-tree -d /dev/sdb | grep -A 10000 "chunk tree" | grep -B 10000 "device tree" | grep -A 13 "FIRST_CHUNK_TREE CHUNK_ITEM"
>
> I've reformatted that so it's not overly long line. For dumps it's ok
> but a command can be split by && or | .
>
>> item 2 key (FIRST_CHUNK_TREE CHUNK_ITEM 22020096) itemoff 15975 itemsize 112
>> length 8388608 owner 2 stripe_len 65536 type SYSTEM|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 2 offset 1048576
>> dev_uuid d9fe51c4-6e79-446d-87ee-5be3184798cd
>> stripe 1 devid 1 offset 22020096
>> dev_uuid 16f626ca-1a54-469b-ac7e-25623af884ab
>> item 3 key (FIRST_CHUNK_TREE CHUNK_ITEM 30408704) itemoff 15863 itemsize 112
>> length 268435456 owner 2 stripe_len 65536 type METADATA|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 2 offset 9437184
>> dev_uuid d9fe51c4-6e79-446d-87ee-5be3184798cd
>> stripe 1 devid 1 offset 30408704
>> dev_uuid 16f626ca-1a54-469b-ac7e-25623af884ab
>> item 4 key (FIRST_CHUNK_TREE CHUNK_ITEM 298844160) itemoff 15751 itemsize 112
>> length 314572800 owner 2 stripe_len 65536 type DATA|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 2 offset 277872640
>> dev_uuid d9fe51c4-6e79-446d-87ee-5be3184798cd
>> stripe 1 devid 1 offset 298844160
>> dev_uuid 16f626ca-1a54-469b-ac7e-25623af884ab
>>
>> After:
>> Stripe 0 is on devid 1; Stripe 1 is on devid 2
>>
>> ./mkfs.btrfs -fq -draid1 -mraid1 /dev/sdb /dev/sdc && btrfs in dump-tree -d /dev/sdb | grep -A 10000 "chunk tree" | grep -B 10000 "device tree" | grep -A 13 "FIRST_CHUNK_TREE CHUNK_ITEM"
>> /dev/sdb: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
>> /dev/sdc: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 42 48 52 66 53 5f 4d
>> item 2 key (FIRST_CHUNK_TREE CHUNK_ITEM 22020096) itemoff 15975 itemsize 112
>> length 8388608 owner 2 stripe_len 65536 type SYSTEM|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 1 offset 22020096
>> dev_uuid 6abc88fa-f42e-4f0c-9bc3-2225735e51d1
>> stripe 1 devid 2 offset 1048576
>> dev_uuid 73746d27-13a6-4d58-ac6b-48c90c31d94d
>> item 3 key (FIRST_CHUNK_TREE CHUNK_ITEM 30408704) itemoff 15863 itemsize 112
>> length 268435456 owner 2 stripe_len 65536 type METADATA|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 1 offset 30408704
>> dev_uuid 6abc88fa-f42e-4f0c-9bc3-2225735e51d1
>> stripe 1 devid 2 offset 9437184
>> dev_uuid 73746d27-13a6-4d58-ac6b-48c90c31d94d
>> item 4 key (FIRST_CHUNK_TREE CHUNK_ITEM 298844160) itemoff 15751 itemsize 112
>> length 314572800 owner 2 stripe_len 65536 type DATA|RAID1
>> io_align 65536 io_width 65536 sector_size 4096
>> num_stripes 2 sub_stripes 0
>> stripe 0 devid 1 offset 298844160
>> dev_uuid 6abc88fa-f42e-4f0c-9bc3-2225735e51d1
>> stripe 1 devid 2 offset 277872640
>> dev_uuid 73746d27-13a6-4d58-ac6b-48c90c31d94d
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>
> Added to devel, thanks.
>
I don't see this patch is integrated. Any idea?
Thanks, Anand
next prev parent reply other threads:[~2019-08-27 2:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 2:26 [PATCH] btrfs_progs: mkfs: match devid order to the stripe index Anand Jain
2019-06-28 2:44 ` Qu Wenruo
2019-06-28 3:28 ` Anand Jain
2019-06-28 6:01 ` Qu Wenruo
2019-07-03 13:21 ` David Sterba
2019-08-27 2:02 ` Anand Jain [this message]
2019-09-02 8:01 ` Anand Jain
2019-09-02 16:22 ` David Sterba
2019-09-03 12:06 ` David Sterba
2019-09-04 11:10 ` Anand Jain
2019-09-12 17:54 ` David Sterba
2019-12-10 15:42 ` Filipe Manana
2019-12-11 1:45 ` Qu Wenruo
2019-12-11 8:58 ` Filipe Manana
2019-09-03 10:46 ` Johannes Thumshirn
2019-09-04 12:54 ` [PATCH] btrfs: misc-tests-021 fix restore overlapped on disk's stale data Anand Jain
2019-09-04 13:29 ` [PATCH Fix-title-prefix] btrfs-progs: " Anand Jain
2019-09-04 14:05 ` Johannes Thumshirn
2019-09-04 14:06 ` Nikolay Borisov
2019-09-10 7:43 ` Anand Jain
2019-09-12 17:49 ` David Sterba
2019-09-10 7:37 ` [PATCH] btrfs_progs: mkfs: match devid order to the stripe index Anand Jain
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=e2ab1be9-8b83-987f-0d88-c1f5547060d4@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).