[PATCH] xfs_admin: exit gracefully for non-XFS fileststems
Eric Sandeen
sandeen at sandeen.net
Thu Jan 29 15:43:38 CST 2009
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>
I guess I'd rather see this the reverse, and require a flag to allow
xfs_db to work on something that doesn't look like xfs - err on the side
of safety (hm but I suppose db is usually in read-only mode...)
Addresses jeffpc's criticism too, to some degree; you can use -F to mean
"force" or "foreign" :) before xfs_db will touch the fs.
So I think I personally like it better with the inverse, where it always
exits on bad magic unless you explicitly tell it otherwise. Making the
error message reference the option might be nice ("Use -F to ignore this
error" or somesuch)
-Eric
More information about the xfs
mailing list