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>