btrfs: Add test that checks rmdir(2) can delete a subvolume

Add btrfs test that checks "rmdir" or "rm -r" command can delete a
subvolume like an ordinary directory.

This behavior has been restricted long time but becomes allowed by
kernel commit a79a464d5675 ("btrfs: Allow rmdir(2) to delete an
empty subvolume")

The test will be skipped if kernel does not support the feature,
which can be checked whether /sys/fs/btrfs/features/rmdir_subvol
exists or not.

Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
3 files changed