]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: Document & robustify blkmap_next_off()
authorEric Sandeen <sandeen@redhat.com>
Tue, 5 Jun 2012 18:25:45 +0000 (13:25 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 5 Jun 2012 18:25:45 +0000 (13:25 -0500)
commit22ff57bc95ef4decc73a466b7f9fd5d0c9da212c
treed6ae62c1e19a7f6b1c3904e206ca2072d889bc49
parentb220548bf2e51f4a573b19b4a8b4b15856bd4a06
xfs_repair: Document & robustify blkmap_next_off()

blkmap_next_off() was cryptic (to me), so document what it does.
Also catch cases when the passed in extent index 't' is beyond
the number of extents in the blkmap, so that:

        ext = blkmap->exts + *t;

doesn't walk off the end of the array into garbage.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
repair/bmap.c