Re: [PATCH, RFC] btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/25/13 5:39 PM, Tsutomu Itoh wrote:
> On 2013/02/21 0:37, Stefan Behrens wrote:
>> On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
>>> The core of this is shamelessly stolen from xfsprogs.
>>>
>>> Use blkid to detect an existing filesystem or partition
>>> table on any of the target devices.  If something is found,
>>> require the '-f' option to overwrite it, hopefully avoiding
>>> disaster due to mistyped devicenames, etc.
>>>
>>> # mkfs.btrfs /dev/sda1
>>>
>>> WARNING! - Btrfs v0.20-rc1-59-gd00279c-dirty IS EXPERIMENTAL
>>> WARNING! - see http://btrfs.wiki.kernel.org before using
>>>
>>> /dev/sda1 appears to contain an existing filesystem (xfs).
>>> Use the -f option to force overwrite.
>>> #
>>>
>>> This does introduce a requirement on libblkid.
>>>
>>> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
>>
>> This means that it is now required to change all occurrences of
>> "mkfs.btrfs" to "mkfs.btrfs -f" everywhere. Can't we first establish a
> 
> I also think so.
> It means -f is not significant to me, I think.
> (Most of my test scripts fails without -f. So I'll always type "mkfs.btrfs -f")
> 
> Therefore I want you to revert commit:2a2d8e1962e8b6cda7b0a7584f6d2fb95d442cb6.
>   btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table
> 
> How do you think about it?

What if you submit a patch to look at an environment variable,
BTRFS_CLOBBERS_ALL=1 which causes it to not require -f to overwrite?
Then you can just set it once at the top of your test environment,
and not change every instance?

Otherwise, I guess I think:

WARNING! - Btrfs v0.20-rc1-212-gf6ef8b5 IS EXPERIMENTAL

and we need to expect that things might change ...

-Eric

> Thanks,
> Tsutomu
> 
>> time period of 100 years where the -f option is tolerated and ignored,
>> and then in 2113 we require that the users add the -f option?
>>
>> (Just had to do this string replacement everywhere, and had to add -f to
>> xfstest's _scratch_mkfs in common.rc as well). Sigh.
>>
> 

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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux