btrfs: test orphan item cleanup
authorJeff Mahoney <jeffm@suse.com>
Wed, 1 Apr 2015 00:35:44 +0000 (11:35 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Apr 2015 00:35:44 +0000 (11:35 +1100)
commitdd26ee398fa2445eff3481af13e9eee430793bf8
tree918a52841761ee5918578dc9e1da4a8205be2ee3
parent552dcfb47c9003bff2c809677f4db9da3453422b
btrfs: test orphan item cleanup

This test tests three conditions where orphan items need to be
cleaned up:

1) Default subvolume is fs tree root (mkfs default)
2) Default subvolume has been set explicitly to another subvolumei
   (set-default)
3) Looking up a subvolume during a traversal

In the kernel, these three cases use separate mechanisms to look up
the subvolumes. There was a bug in the kernel where case #2 wasn't
getting handled and so orphan items would never be cleaned up if the
default subvolume was explicitly set. This issue was fixed with the
upstream commit: btrfs: cleanup orphans while looking up default
subvolume.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/btrfs/085 [new file with mode: 0755]
tests/btrfs/085.out [new file with mode: 0644]
tests/btrfs/group