btrfs: test btrfs send after swapping directory names differently
authorFilipe Manana <fdmanana@suse.com>
Mon, 4 May 2015 12:56:13 +0000 (22:56 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 4 May 2015 12:56:13 +0000 (22:56 +1000)
commit51c53eb24c321f16d05e24fd4d71523cfcbddd9b
tree705c8b13648d3b986b1353b196b3c20ebbb4d096
parentf24afad0f8cf5d6961adf901b7271fc4efa8a7a9
btrfs: test btrfs send after swapping directory names differently

Test btrfs incremental send after renaming and moving directories around in a
way that ends up making a directory have different dentries with the same name
but pointing to different inodes in the parent and send snapshots, and also
inverting the ancestor-descendent relationship between one of those inodes and
some other inode.

Cases like this made an incremental send enter an infinite lopp when building
path strings, leading to -ENOMEM errors when the path string reached a length
of PATH_MAX.
This issue was fixed by the following linux kernel btrfs patch:

  Btrfs: incremental send, check if orphanized dir inode needs delayed rename

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