xfs
[Top] [All Lists]

Re: [PATCH] xfs_admin: exit gracefully for non-XFS fileststems

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH] xfs_admin: exit gracefully for non-XFS fileststems
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 29 Jan 2009 16:43:38 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20090125050342.GA30091@xxxxxx>
References: <20090125050342.GA30091@xxxxxx>
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
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@xxxxxxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

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

<Prev in Thread] Current Thread [Next in Thread>