Re: [PATCH] nilfs-utils: mkfs.nilfs2 should check presence of NILFS2 volume on device

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

 



Am Sonntag, 24. März 2013 schrieb Vyacheslav Dubeyko:
> Hi Martin,

Hi Vyacheslav, Eric and everyone else,

Eric, put you on Cc, cause you wrote mkfs.btrfs -f patch...

> On Mar 24, 2013, at 3:09 PM, Martin Steigerwald wrote:
> > Hi!
> > 
> > Am Samstag, 23. März 2013 schrieb Ryusuke Konishi:
> >> On Sat, 23 Mar 2013 15:45:22 +0400, Vyacheslav Dubeyko wrote:
> >>> From: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
> >>> Subject: [PATCH] nilfs-utils: mkfs.nilfs2 should check presence of
> >>> NILFS2 volume on device
> >>> 
> >>> The mkfs.nilfs2 utility should check presence of NILFS2 volume on
> >>> device and to warn a user about possibility to destroy data by mkfs
> >>> activity. This patch tries to read and to validate checksums of
> >>> primary and secondary superblocks on opened device. If this operation
> >>> ends successfully then mkfs.nilfs2 informs a user about potential
> >>> danger to destroy existing NILFS2 volume. The execution of
> >>> mkfs.nilfs2 stops with offering to make decision about continuation
> >>> or abortion of operation. However, if a user runs mkfs.nilfs2 with
> >>> "-q" option then checking of NILFS2 volume is skipped.
> >>> 
> >>> Reported-by: Hendrik Levsen <hendrik@xxxxxxxxxx>
> >>> Signed-off-by: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
> >>> Tested-by: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
> >> 
> >> This patch breaks compatibility of mkfs.nilfs2 in the case when users
> >> or tools are expecting overwrite an exisiting partition.  However, I
> >> am inclined to accept this kind of protection feature.
> >> 
> >> One thing disturbing is that "quiet option" is used to turn off the
> >> protection; "quiet option" is just an option to suppress messages.
> >> 
> >> Please consider adding "force overwrite (-f)" option like
> >> mkfs.xfs.
> > 
> > Also please consider adding of other filesystems via blkid just as
> > mkfs.xfs and since a short time also mkfs.btrfs does.
> 
> Sorry, I don't fully understand about mkfs.btrfs. Could you describe in
> more details what you mean?

mkfs.xfs was the first and to my knowledge long time the only mkfs which 
checked for existing filesystems. And it does so via blkid (at least 
meanwhile, I think it used different means initially). This way it detects 
all current Linux filesystems without duplicating the detection code. blkid 
also detects nilfs:

merkaba:~> mkfs.nilfs2 -L test /dev/merkaba/zeit
mkfs.nilfs2 (nilfs-utils 2.1.4)
Start writing file system initial data to the device
       Blocksize:4096  Device:/dev/merkaba/zeit  Device Size:21474836480
File system initialization succeeded !! 
merkaba:~> blkid /dev/merkaba/zeit
/dev/merkaba/zeit: LABEL="test" UUID="3a105634-638e-4288-8f39-0e5324361431" 
TYPE="nilfs2" 

On some occasion the thought came up that it would be good to have a similar 
behavior in mkfs.btrfs. And mkfs.btrfs basically got a similar 
implementation provided by Eric Sandeen. I digged it out, neither 
ixquick.com nor Google found it out of the box and gmane search also didn´t 
yield a result. Thus manually browsed:

http://www.mail-archive.com/linux-btrfs@xxxxxxxxxxxxxxx/msg22216.html

Ciao
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" 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 BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux