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: Sat, 26 Sep 2015 15:56:42 +0800	[thread overview]
Message-ID: <56064FBA.4000809@gmx.com> (raw)
In-Reply-To: <20150925151951.GI11442@twin.jikos.cz>



在 2015年09月25日 23:19, David Sterba 写道:
> On Thu, Sep 24, 2015 at 09:18:51AM +0800, Qu Wenruo wrote:
>> After some ext* lecture given by my teammate, Wang Xiaoguang, I'm more
>> convinced that, at least for convert from ext*, separate chunk type will
>> not be a good idea.
>
> Thanks for the additional research.
>
>> For above almost empty ext4 case, it will cause less problem, as
>> we can batch several groups and put a large data chunk to cover them,
>> then allocate a 100+M metadata chunk.
>
>> But if the filesystem is used and most group only has scattered
>> available space, we may ended up unable to alloc any metadata chunk.
>
> I think this is the price we pay for the in-place conversion, we can
> safely use only the free space and respect the constraints it gives.
> As long as the ext2_subvol exists, ie. the original data and metadata
> are pinned, we don't have much choice. Rebalancing is possible but given
> the remaining space may fail to allocate block groups of desired size.
>
>> This will make the usage of limited block group quite limited.
>> Although I'll continue add such support for btrfs-convert, I'm quite
>> concerned about the usage...
>
> So can we do it like this:
>
> 1) enable support for mixed bg in convert
> 2) implement mixed -> split conversion in balance
> 3) force convert to do mixed bgs by default
>
> The conversion from/to mixed would be good on it's own but may not be
> trivial to implement.

Agreed, and consider it is kernel code, it will be much harder to 
code/debug.

> If the main concern about result of conversion is
> bad bg layout, I'd say that we rely on balance to reshuffle the bgs to
> make the filesystem more up to the desired layout.

That's OK.
At least we don't need to implement kernel convert support for mixed bg.

I'll implement both mixed bg and separate one and allow user to choose.

And for extreme case, if we can't allocate any metadata chunk larger 
than 16M, either info user and exit or do automatic mixed-bg conversion 
if no conflicting options.

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-26  7:56 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
2015-09-24  1:18   ` Qu Wenruo
2015-09-25 15:19     ` David Sterba
2015-09-26  7:56       ` Qu Wenruo [this message]
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=56064FBA.4000809@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.