]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: skip freelist scans of corrupt agf
authorEric Sandeen <sandeen@sandeen.net>
Sat, 9 Mar 2013 15:21:55 +0000 (15:21 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 11 Mar 2013 12:10:08 +0000 (07:10 -0500)
commita529cc7f0e5bd1632e5169d015c54e3a6122ee0f
treef1d6d4bfaaa980313b054714752a0aca29051023
parent7e8e3cce00f38ee1533df0e7bda6bcb584b03e96
xfsprogs: skip freelist scans of corrupt agf

If an agf has bad values in the freelist, this can wreak
havoc if, for example, first > last and the loop
never exits; we index agfl->agfl_bno[i] off into the weeds.

If they're off, warn about it and skip the scan.

This is done both in xfs_check and xfs_db's freespace cmd.

Also fix uninit'd variable "i" from previous, similar fix
for xfs_repair.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
db/check.c
db/freesp.c
repair/scan.c