mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-18 02:36:56 +00:00
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:
parent
62830bcb23
commit
49fef369ff
@ -21,7 +21,8 @@ run_check truncate -s2g img
|
|||||||
loopdev=`run_check_stdout $SUDO_HELPER losetup --find --show img`
|
loopdev=`run_check_stdout $SUDO_HELPER losetup --find --show img`
|
||||||
run_check $SUDO_HELPER dmsetup create $dmname --table "0 1048576 linear $loopdev 0"
|
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
|
rot=/sys/class/block/$base/queue/rotational
|
||||||
|
|
||||||
# switch rotational
|
# switch rotational
|
||||||
|
Loading…
Reference in New Issue
Block a user