On 2017-04-21 07:13, Hans van Kranenburg wrote:
On 04/21/2017 12:31 PM, Hans van Kranenburg wrote:
Doh,

On 04/21/2017 12:26 PM, Hans van Kranenburg wrote:
[...]

== Thinking out of the box ==

Technically, converting from DUP to single could also mean:
* Flipping one bit in the block group type flags to 0 for each block
group item
* Flipping one bit in the chunk type flags and removing 1 stripe struct
for each metadata chunk item
* Removing the

Removing the dev extent objects for all removed stripes from the dev tree.

* Anything else?

How feasible would it be to write btrfs-progs style conversion to do this?

From the feedback on IRC already, to clear things up:

I'm *not* proposing/asking for this kind of functionality to be
officially available or added to mainline btrfs-progs and be supported
for every user to use. I understand that's a whole different kind of
discussion.

I only mean... would there be any great show-stopper for this idea which
would mean I couldn't technically do it myself in a 'one-off' style.

Not that I know of, but it would be kind of nice to have an upstream version too (especially if it could handle raid1 to single conversion).

To be entirely honest though, the current profile conversion stuff is somewhat braindead. It appears to assume that there is only one partially filled chunk (IOW, that you just ran a full balance), and therefore does some seriously extraneous work. This in turn scales multiplicatively based on how much data needs converted.

WIth a proper design, raid1 or dup to single should just drop the extra copy, single to dup or raid1 should just be adding an extra copy, and raid1 to dup or dup to raid1 should just move one of the copies, but doing that would make things seriously more complicated.
--
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