[PATCH 04/15] mkfs: validate all input values

Dave Chinner david at fromorbit.com
Wed Dec 11 17:57:22 CST 2013


On Wed, Dec 11, 2013 at 12:27:40PM +0800, Jeff Liu wrote:
> Hi, Dave,
> 
> While test this patch, I wonder if we should also validate non-supported
> data block size combine with the system page size or not, as we do such
> kind of checkup for non-supported inode size in mkfs...
> 
> I can simply trigger scary corruption error with backtraces on 4K page
> size machine via: mkfs.xfs -f -b size=8192 /dev/xxx; mount /dev/xxx /xfs

That's the same case as a single bit error, which is somethign we
should catch and warn loudly about. So, no, I don't think we should
change it for this reason.

That said, we do need to improve the verfiers to be able to separate
CRC validation errors from corruption detected by the verifier. This
means we'll need to rework the boiler-plate error handling in all
the verifiers and we should probably address the verbosity issue
of these corruption warnings at that point in time....

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list