-------- Original Message --------
Subject: Re: [PATCH 0/8] Introduce offline fsid/chunk tree uuid change
for btrfstune.
From: David Sterba <dsterba@xxxxxxx>
To: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
Date: 2015年05月05日 23:20
On Tue, May 05, 2015 at 02:16:38PM +0800, Qu Wenruo wrote:
This patchset will introduce offline fsid/chunk tree uuid change
function to btrfstune command, with "-u" and "-U" options respectively.
The implement is in-place btrfs_header modification, without transaction
protection. So the uuid change can be done on any valid image even it is
already full.
Since we don't use transaction to protect the convert, it's possible one
can stop the running convert progress, causing the fs in a inconsistent
status and unable to be mounted.
To avoid such problem, we introduce new open ctree flags
OPEN_CTREE_IGNORE_FSID, allowing btrfstune to finish the convert.
Code looks good to me. I'm not sure whether it should land in btrfstune
or in 'btrfs' proper.
* btrfstune should go away at some point, so I'd rather not add new
features there
* 'btrfs property set -t filesystem uuid' seems best to me at this moment
Good idea.
I'll change it to property in next version.
A minor suggestion: set BTRFS_SUPER_FLAG_ERROR on the filesystem during
the conversion and drop it after it finishes successfully. It's merely a
hint that there's something wrong with the filesytem, the mount will
fail because filesystem uuid would not match the device id.
Nice idea too.
But I'd like to use more specific flags like
BTRFS_SUPER_FLAG_UUID_CHANGING to give better info if kernel can't mount it.
Thanks for all these advice!
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html