]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: add test for btrfs send directory moves/renames
authorFilipe Manana <fdmanana@gmail.com>
Fri, 4 Apr 2014 06:17:01 +0000 (17:17 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 4 Apr 2014 06:17:01 +0000 (17:17 +1100)
commit1a874395715e1f71463f7b992267aee38674ce57
tree7d4a7bd7244c700901b9b4f2aea6a6775d719779
parentc99c8478f234aa3b9e57940d95d4126d554e5478
btrfs: add test for btrfs send directory moves/renames

Regression test for a btrfs incremental send issue where the kernel failed
to build paths strings. This resulted either in sending a wrong path string
to the send stream or entering an infinite loop when building it.
This happened in the following scenarios:

1) A directory was made a child of another directory which has a lower inode
   number and has a pending move/rename operation or there's some non-direct
   ancestor directory with a higher inode number that was renamed/moved too.
   This made the incremental send code go into an infinite loop when building
   a path string;

2) A directory was made a child of another directory which has a higher inode
   number, but the new parent wasn't moved nor renamed. Instead some other
   ancestor higher in the hierarchy, with an higher inode number too, was
   moved/renamed too. This made the incremental send code go into an infinite
   loop when building a path string;

3) An orphan directory is created and at least one of its non-immediate
   descendent directories have a pending move/rename operation. This made
   an incremental send issue to the send stream an invalid path string that
   didn't account for the orphan ancestor directory.

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