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