]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/064: allow room for unexpected allocation behavior
authorEric Whitney <enwlinux@gmail.com>
Mon, 21 Sep 2015 01:05:26 +0000 (11:05 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Sep 2015 01:05:26 +0000 (11:05 +1000)
commit4fbcbdf76bee4214bb8343dc304a0ef0f212d09c
tree1dc1b2200972ef9bc939cc19968e2c51eaabddc9
parent86c1b5588cabfb372521361bd3057e306790014f
generic/064: allow room for unexpected allocation behavior

Per Dave Chinner's suggestion, modify generic/064 so that it won't fail
if it finds a few more extents than it expects in its test file after
inserting ranges.  When 064's test file is first created, some file
systems may use more than the ideal minimum single extent to represent
it, and this can lead to a mismatch between the actual and expected
extent count after the ranges have been inserted.  Ext4 file systems
mounted with delayed allocation disabled can exhibit this behavior
if a test file's blocks happen to be allocated across regions of file
system metadata.

Also, replace the open coded counting of extents and holes with a
simpler call to _count_extents(), and clarify some comments.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/064 [changed mode: 0644->0755]
tests/generic/064.out