On Sat, Sep 26, 2015 at 03:56:42PM +0800, Qu Wenruo wrote:
> > 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.

I've looked into that some time ago. The relocation code seems ready for
that, the data and metadata blocks are filtered separately from the
given chunk and moved to the new chunk. We need to propagate the request
to convert from/to mixed-bg through the balance filters.

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

We can possibly scan the image first for the available holes and then
decide if it's feasible to do the conversion with the requested fs features.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to