]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: xfs_repair skip freelist scan of corrupt agf in no-modify mode
authorEric Sandeen <sandeen@sandeen.net>
Sat, 2 Mar 2013 21:23:12 +0000 (21:23 +0000)
committerRich Johnston <rjohnston@sgi.com>
Fri, 8 Mar 2013 16:18:51 +0000 (10:18 -0600)
commit7e8e3cce00f38ee1533df0e7bda6bcb584b03e96
treead68d012f0a098a20041a762c7a0b9e97cdc2935
parenta0a28a6ac3005ec320ef73066e57d9ae1fd41754
xfsprogs: xfs_repair skip freelist scan of corrupt agf in no-modify mode

In xfs_repair's no-modify mode (-n), verify_set_agf doesn't fix up
bad freelist blocks that it finds.  When we get to scan_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.

To fix this, re-check the values in no-modify mode, and if
they're off, warn about it and skip the scan.

Reported-by: Ole Tange <tange@binf.ku.dk>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
repair/scan.c