Linux NILFS development
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin-3kZCPVa5dk2azgQtNeiOUg@public.gmane.org>
To: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
Cc: Ryusuke Konishi
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	hendrik-j5CO6tLloWodnm+yROfE0A@public.gmane.org,
	Eric Sandeen <sandeen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] nilfs-utils: mkfs.nilfs2 should check presence of NILFS2 volume on device
Date: Sun, 24 Mar 2013 15:43:22 +0100	[thread overview]
Message-ID: <201303241543.23310.Martin@lichtvoll.de> (raw)
In-Reply-To: <91A35B7F-A668-4B57-888F-7CE2A7D0ED86-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>

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-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
> >>> 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-j5CO6tLloWodnm+yROfE0A@public.gmane.org>
> >>> Signed-off-by: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
> >>> Tested-by: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
> >> 
> >> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-03-24 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 11:45 [PATCH] nilfs-utils: mkfs.nilfs2 should check presence of NILFS2 volume on device Vyacheslav Dubeyko
     [not found] ` <1364039122.16985.2.camel-dzAnj6fV1RxGeWtTaGDT1UEK6ufn8VP3@public.gmane.org>
2013-03-23 14:32   ` Ryusuke Konishi
     [not found]     ` <20130323.233257.27780281.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2013-03-24 12:09       ` Martin Steigerwald
     [not found]         ` <201303241309.19162.Martin-3kZCPVa5dk2azgQtNeiOUg@public.gmane.org>
2013-03-24 13:41           ` Vyacheslav Dubeyko
     [not found]             ` <91A35B7F-A668-4B57-888F-7CE2A7D0ED86-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2013-03-24 14:43               ` Martin Steigerwald [this message]
     [not found]                 ` <201303241543.23310.Martin-3kZCPVa5dk2azgQtNeiOUg@public.gmane.org>
2013-03-24 16:08                   ` Vyacheslav Dubeyko
     [not found]                     ` <8C599058-8F00-4B0E-9BB0-D7F1DF34DC91-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2013-03-24 16:03                       ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201303241543.23310.Martin@lichtvoll.de \
    --to=martin-3kzcpva5dk2azgqtneioug@public.gmane.org \
    --cc=hendrik-j5CO6tLloWodnm+yROfE0A@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sandeen-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox