[PATCH 2/2 V2] xfs_db: add crc manipulation commands
Dave Chinner
david at fromorbit.com
Tue Sep 16 18:52:28 CDT 2014
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 at fromorbit.com
More information about the xfs
mailing list