All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <quwenruo@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/4] Fix for btrfs-convert chunk type and fsck support
Date: Fri, 11 Sep 2015 23:23:20 +0800	[thread overview]
Message-ID: <55F2F1E8.1000001@gmx.com> (raw)
In-Reply-To: <20150911145638.GP8891@twin.jikos.cz>


在 2015年09月11日 22:56, David Sterba 写道:
> On Thu, Sep 10, 2015 at 10:34:13AM +0800, Qu Wenruo wrote:
>> Again the buggy btrfs-convert, even David tried to ban mixed-bg features
>> for btrfs-convert, it will still put data and metadata extents into the
>> same chunk, without marking the chunk mixed.
>>
>> So in the patchset, first add fsck support for such problem, and then
>> force btrfs-convert to use mixed block group.
>
> I don't think this is a good option for now.

I'm OK with the decision not to force mixed bg right now.
As you mentioned, it should be better to do it until we fix the whole 
problem.

> People convert
> many-terabytes filesystems.Unless there's a way how to convert such
> filesystem to the split data/metadata type I don't want to force mixed
> bg to convert.

But even for case of TB convert, I'm not sure if that will be a good 
idea to use sperate data/metadata chunk.
Even for ext4, I'm not sure if it does store extents/metadata in a good 
manaer.
IIRC, ext* will allocate space from the middle of free space to avoid 
fragment. (I'm not familiar with ext* anyway, so I can be totally wrong)
So ext* may cause a lot of small holes in its free space.

And for convert, all ext* data and metadata must be covered by btrfs 
DATA chunk, and then restore btrfs metadata into the resting space.
Either causing tons of small metadata chunks between scatterd data 
chunks, or almost no space left for metadata.

So IMHO, for converted case, mixed bg would be a quite good and generic 
choice.

> The bug you describe is there, but I wonder why didn't
> we notice problems that arise from it.

Personally speaking, COW nature of btrfs is doing a quite good job to 
hide the bug, and even self healing.

For metadata in non-mixed DATA chunk, for read case, kernel won't detect 
anything wrong as long as it can pass the generation/csum/backref check.

For writting metadata in non-mixed DATA chunk, COW will alloc new tree 
block from METADATA chunk.
And if we have enough metadata operation, the problem will just 
disappear after all metadata is COWed.

Only some corner case will trigger a WARNING or BUG.

We can add some extra check in check_tree_block() to check such case, 
but I think it will bring a bad impact on performance.

Thanks,
Qu

> --
> 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
>

  reply	other threads:[~2015-09-11 15:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10  2:34 [PATCH 0/4] Fix for btrfs-convert chunk type and fsck support Qu Wenruo
2015-09-10  2:34 ` [PATCH v2 1/5] btrfs-progs: fsck: Add check for extent and parent chunk type Qu Wenruo
2015-09-10  2:34 ` [PATCH v2 2/5] btrfs-progs: utils: Check nodesize against features Qu Wenruo
2015-09-10  2:34 ` [PATCH v2 3/5] btrfs-progs: convert: force convert to used mixed block group Qu Wenruo
2015-09-10  2:34 ` [PATCH v2 4/5] btrfs-progs: util: add parameter for btrfs_list_all_fs_features Qu Wenruo
2015-09-10  2:37 ` [PATCH v2 5/5] btrfs-progs: convert-test: Disable different nodesize test Qu Wenruo
2015-09-11 14:56 ` [PATCH 0/4] Fix for btrfs-convert chunk type and fsck support David Sterba
2015-09-11 15:23   ` Qu Wenruo [this message]
2015-09-24  1:18   ` Qu Wenruo
2015-09-25 15:19     ` David Sterba
2015-09-26  7:56       ` Qu Wenruo
2015-09-29  9:31         ` David Sterba
2015-09-25 15:49 ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09  8:49 Qu Wenruo

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=55F2F1E8.1000001@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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.