]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: reproduce ext4 bugs in a shift extents logic
authorRoman Pen <roman.penyaev@profitbricks.com>
Wed, 11 Jan 2017 09:52:39 +0000 (10:52 +0100)
committerEryu Guan <eguan@redhat.com>
Sun, 15 Jan 2017 05:56:45 +0000 (13:56 +0800)
commit2504b26a3a71d499ff745cdb007556ba20123fe5
tree88a3e36960093f2bac4ae798e6a5408488e51a91
parent726f8c357f58cf54c26c6ce051bf36d58119e58b
generic: reproduce ext4 bugs in a shift extents logic

Regression test which targets two nasty ext4 bugs in a logic which
shifts extents:

1) 14d981f468a1 ("ext4: Include forgotten start block on fallocate insert range")

Test tries to insert many blocks at the same offset to reproduce
the following layout on ext4:

   block #0  block #1
   |ext0 ext1|ext2 ext3 ...|
        ^
     insert of a new block

Because of an incorrect range first block is never reached,
thus ext1 is untouched, resulting to a hole at a wrong offset:

What we got:

   block #0   block #1
   |ext0 ext1|   ext2 ext3 ...|
              ^
              hole at a wrong offset

What we expect:

   block #0    block #1
   |ext0   ext1|ext2 ext3 ...|
        ^
        hole at a correct offset

2) 2b3864b32403 ("ext4: do not polute the extents cache while shifting extents")

Extents status tree is filled in with outdated offsets while doing
extent shift, that leads to wrong data blocks.   That's why md5sum
of a result file is being checked after each block insert.

Signed-off-by: Roman Pen <roman.penyaev@profitbricks.com>
Cc: "Theodore Ts'o <tytso@mit.edu>"
Cc: Eryu Guan <eguan@redhat.com>
Cc: linux-ext4@vger.kernel.org
Cc: fstests@vger.kernel.org
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/404 [new file with mode: 0755]
tests/generic/404.out [new file with mode: 0644]
tests/generic/group