[PATCH] xfs_admin: exit gracefully for non-XFS fileststems
Josef 'Jeff' Sipek
jeffpc at josefsipek.net
Sat Jan 24 23:56:18 CST 2009
On Sun, Jan 25, 2009 at 06:03:42AM +0100, Christoph Hellwig wrote:
> Exit gracefully if the magic number doesn't match xfs in xfs_admin
> and xfs_ncheck. This is implemented by a new -C option to xfs_db
> which makes it exit with a useful error message in case the filesystem
> doesn't match the XFS superblock magic number.
>
>
> Reported-by: Dick Middleton <dick at lingbrae.com>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
...
> Index: xfsprogs-dev/man/man8/xfs_db.8
> ===================================================================
> --- xfsprogs-dev.orig/man/man8/xfs_db.8 2009-01-24 19:15:16.855428751 +0100
> +++ xfsprogs-dev/man/man8/xfs_db.8 2009-01-24 19:17:21.689554003 +0100
...
> @@ -32,6 +34,10 @@ that run
> .PP
> .SH OPTIONS
> .TP
> +.B \-C
> +Check the superblock magic number and exit gracefully if the filesystem is not
> +an XFS filesystem.
Obviously, the 'C' is supposed to stand for "check". I think that's
misleading. xfs_db _always_ checks the SB magic. This option just changes
the the behavior on a mis-match. In a way, I think this flag belongs into
the "verbose/quiet" category. It really is
--you-really-want-to-work-with-xfs-volumes-only...I guess it's a don't-force
flag.
I can't think of a good letter for it at the moment.
Josef 'Jeff' Sipek.
--
Hegh QaQ law'
quvHa'ghach QaQ puS
More information about the xfs
mailing list