[PATCH] xfs_db: allow recalculating CRCs on invalid metadata
Eric Sandeen
sandeen at sandeen.net
Thu May 12 18:31:03 CDT 2016
On 5/12/16 6:28 PM, Dave Chinner wrote:
>>> +
>>> > > + if (corrupt) {
>>> > > nowrite_ops.verify_write = xfs_dummy_verify;
>>> > > - iocur_top->bp->b_ops = &nowrite_ops;
>>> > > - dbprintf(_("Allowing write of corrupted data\n"));
>>> > > + dbprintf(_("Allowing write of corrupted data and bad CRC\n"));
>>> > > + } else {
>> >
>> > Maybe a helpful/redundant comment about /* invalid_data */ alongside } else { ?
> I though the dbprintf() documented it well enough? maybe move that
> to the top of each branch?
Oh, I suppose it does. By the time we returned early on !corrupt & ! invalid_data,
then tested explicitly for (corrupt), it requires a decent brain-stack to
remember what the } else { clause is for, IMHO.
But like I said, just a thought.
-Eric
More information about the xfs
mailing list