]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfstests: add test for btrfs incremental send infinite loop issue
authorFilipe David Borba Manana <fdmanana@gmail.com>
Fri, 24 Jan 2014 01:04:18 +0000 (12:04 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 24 Jan 2014 01:04:18 +0000 (12:04 +1100)
commit8c427eb7b8fb0f3480c89de80fbbbf509f60dca7
tree24fa0abfc1d51c4d18cab5fab46ed90f59545c0f
parent7657a1072079a03fd92e3f4c0b23d072f5c28512
xfstests: add test for btrfs incremental send infinite loop issue

Regression test for btrfs' incremental send feature:

1) Create several nested directories;

2) Create a read only snapshot;

3) Change the parentship of some of the deepest directories in a reverse
   way, so that parents become children and children become parents;

4) Create another read only snapshot and use it for an incremental send
   relative to the first snapshot.

At step 4 btrfs' send entered an infinite loop, increasing the memory it
used while building path strings until a krealloc was unable to allocate
more memory, which caused a warning dump in dmesg.

The following linux kernel patch fixes this issue.

   Btrfs: fix infinite path build loops in incremental send
   (https://patchwork.kernel.org/patch/3522361/)

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/030 [new file with mode: 0755]
tests/btrfs/030.out [new file with mode: 0644]
tests/btrfs/group