[PATCH] Check block magic number so we scan only valid blocks.

Christoph Hellwig hch at infradead.org
Wed Jul 7 18:52:18 CDT 2010


On Wed, Jul 07, 2010 at 11:09:11AM -0400, Peter Watkins wrote:
> Hello,
> 
> Occasionally I've hit a SEGV while querying free space in xfs_db on a mounted
> file system. In scanfunc_bno, block->bb_numrecs has crazy values. And bb_magic 
> is not XFS_ABTB_MAGIC.
> 
> Does a check like this, similiar to other places, make sense?

Yes, it's reasonable.  As long as you'd don't expect directly poking at
a life partition giving correct results..


> Should scanfunc_cnt make a similiar check?

Yes.




More information about the xfs mailing list