btrfs-progs: tests: fix misc/005-long-device-name-for-ssd

We use a device mapper device on top of a loop device, the change in
rotational status does not always propagate if change it at the loop
device sysfs node.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-03-01 18:44:56 +01:00
parent 62830bcb23
commit 49fef369ff
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ run_check truncate -s2g img
loopdev=`run_check_stdout $SUDO_HELPER losetup --find --show img`
run_check $SUDO_HELPER dmsetup create $dmname --table "0 1048576 linear $loopdev 0"
base=`basename "$loopdev"`
dmbase=`readlink -f $dmdev`
base=`basename "$dmbase"`
rot=/sys/class/block/$base/queue/rotational
# switch rotational