btrfs: try use forget to unregister device

Some btrfs test cases use btrfs module-reload to unregister devices
in the btrfs kernel. The problem with the module-reload approach is,
if test system contains btrfs as rootfs, then you can't run these
test cases.

Patches [1] introduced btrfs forget feature which can unregister
devices without the module-reload approach.

 [1]
 btrfs-progs: device scan: add new option to forget one or all scanned devices
 btrfs: introduce new ioctl to unregister a btrfs device

And this patch makes relevant changes in the fstests to use this new
feature, when available.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
5 files changed