[DragonFlyBSD - Bug #2843] Fails to create dm device via dmsetup
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Tue Oct 13 06:48:43 PDT 2015
Issue #2843 has been updated by tkusumi.
dev->uuid is zero-filled whenever dm ioctl is called via dmsetup(8) and that's the reason dm_dev_lookup_uuid() returns non null after the first time.
dm targets with a dedicated high-level command (e.g. cryptsetup(8)) sets an unique non-zero value, so there isn't any issue with lookup, and this is what's expected to happen.
Setting uuid is userspace logic that really has nothing to do with kernel dm code other than it's been used for device lookup, however zero-filled uuid is apparently not a valid one. The patch simply ignores uuid lookup if ioctl received zero-filled uuid.
https://www.dragonflybsd.org/~tkusumi/diff/0001-sys-dev-disk-dm-Ignore-zero-filled-uuid-on-inserting.patch
===== with the existing code
# kldload dm
# dmsetup create linear1 --table '0 1000 linear /dev/da3 0'
# dmsetup create delay1 --table '0 1000 delay /dev/da3 0 10 /dev/da3 0 10'
ioctl create call failed: File exists
Command failed
# dmsetup create zero1 --table '0 100 zero'
ioctl create call failed: File exists
Command failed
# dmsetup create error1 --table '0 100 error'
ioctl create call failed: File exists
Command failed
# ls /dev/mapper
control linear1
===== with this commit
# kldload dm
# dmsetup create linear1 --table '0 1000 linear /dev/da3 0'
# dmsetup create delay1 --table '0 1000 delay /dev/da3 0 10 /dev/da3 0 10'
# dmsetup create zero1 --table '0 100 zero'
# dmsetup create error1 --table '0 100 error'
# ls /dev/mapper
control delay1 error1 linear1 zero1
----------------------------------------
Bug #2843: Fails to create dm device via dmsetup
http://bugs.dragonflybsd.org/issues/2843#change-12711
* Author: tkusumi
* Status: New
* Priority: Normal
* Assignee:
* Category:
* Target version:
----------------------------------------
There seems to be an issue with device mapper on dfly.
This happens with dm-error target as well.
I'll try to investigate and fix when possible (since I want dm-flakey on dfly).
----------
# uname
Linux
# dmsetup create zero1 --table '0 100 zero'
# ls -l /dev/mapper/zero*
lrwxrwxrwx 1 root root 7 Sep 29 00:14 /dev/mapper/zero1 -> ../dm-3
# dmsetup create zero2 --table '0 100 zero'
# ls -l /dev/mapper/zero*
lrwxrwxrwx 1 root root 7 Sep 29 00:14 /dev/mapper/zero1 -> ../dm-3
lrwxrwxrwx 1 root root 7 Sep 29 00:14 /dev/mapper/zero2 -> ../dm-4
----------
# uname
DragonFly
# kldload dm
# dmsetup create zero1 --table '0 100 zero'
# ls -l /dev/mapper/zero*
crw-r----- 1 root operator 66, 0x1e110007 Sep 29 00:01 /dev/mapper/zero1
# dmsetup create zero2 --table '0 100 zero'
ioctl create call failed: File exists
Command failed
# ls -l /dev/mapper/zero*
crw-r----- 1 root operator 66, 0x1e110007 Sep 29 00:01 /dev/mapper/zero1
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list