On 17/08/2023 12:46, Josef Bacik wrote: > [...] >> Also, a design decision: I've skipped the btrfs_register_one_device() >> call when mkfs was just used with the single-dev tuning, or else >> it shows a (harmless) error and succeeds, since of course scanning >> fails for such devices, as per the feature implementation. >> So, I thought it was more straightforward to just skip the call itself. >> > > This is a reasonable approach. > [...] Thanks for the review =) >> [...] >> static int convert_to_fst(struct btrfs_fs_info *fs_info) >> { >> int ret; >> @@ -102,6 +106,7 @@ static const char * const tune_usage[] = { >> OPTLINE("-r", "enable extended inode refs (mkfs: extref, for hardlink limits)"), >> OPTLINE("-x", "enable skinny metadata extent refs (mkfs: skinny-metadata)"), >> OPTLINE("-n", "enable no-holes feature (mkfs: no-holes, more efficient sparse file representation)"), >> + OPTLINE("-s", "enable single device feature (mkfs: single-dev, allows same fsid mounting)"), > > btrfstune is going to be integrated into an actual btrfs command, so we're no > longer using short options for new btrfstune commands. Figure out a long name > instead and use that only. Something like > > --convert-to-single-device > > as you would be using this on an existing file system. The rest of the code is > generally fine. Thanks, > > Josef > Perfect, will do! Thanks.