Fix fiemap-tester for fewer extents returned
authorEric Sandeen <sandeen@sandeen.net>
Tue, 8 Mar 2011 15:09:38 +0000 (09:09 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 8 Mar 2011 15:09:38 +0000 (09:09 -0600)
commite423b5c584300c738cee95badc13b01bf38c5dc8
tree63d90c7a2306a0c7d9eb33a51dababd1db5bc36e
parentd40ac0ace931b29c20ae18ba0835eaaa19a41691
Fix fiemap-tester for fewer extents returned

If the fiemap call returns fewer extents than asked for,
the fiemap tester gets confused.  If this happens, advance,
and call fiemap again for the next offset.

XFS exposed this because if a file is all-delalloc, it was
only returning 1 mapped extent (this is probably also a buglet).

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
src/fiemap-tester.c