xfs
[Top] [All Lists]

Re: [PATCH 2/2 V2] xfs_db: add crc manipulation commands

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 2/2 V2] xfs_db: add crc manipulation commands
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 17 Sep 2014 09:52:28 +1000
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5418B459.1010204@xxxxxxxxxxx>
References: <540B4399.4020804@xxxxxxxxxxx> <5418574A.8040102@xxxxxxxxxxx> <5418B459.1010204@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Sep 16, 2014 at 05:06:17PM -0500, Eric Sandeen wrote:
> On 9/16/14 10:29 AM, Eric Sandeen wrote:
> > This adds a new "crc" command to xfs_db for CRC-enabled filesystems.
> > 
> > If a structure has a CRC field, we can validate it, invalidate/corrupt
> > it, or revalidate/rewrite it:
> > 
> > xfs_db> sb 0
> > xfs_db> crc -v
> > crc = 0x796c814f (correct)
> > xfs_db> crc -i
> > Metadata CRC error detected at block 0x0/0x200
> > crc = 0x796c8150 (bad)
> > xfs_db> crc -r
> > crc = 0x796c814f (correct)
> 
> On reflection, do you think these should be more verbose, something like:
> 
> xfs_db> sb 0
> xfs_db> crc -v
> Validating crc:
> crc = 0x796c814f (correct)
> xfs_db> crc -i
> Invalidating CRC:
> Metadata CRC error detected at block 0x0/0x200
> crc = 0x796c8150 (bad)
> xfs_db> crc -r
> Rewriting CRC:
> crc = 0x796c814f (correct)

Seems like a good idea to me. ;)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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