sys/dev/disk/dm: Remove dm_dev::dev_type
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 26 Nov 2016 05:17:43 +0000 (14:17 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 26 Nov 2016 15:52:41 +0000 (00:52 +0900)
commit41a6832221b4d2f8b7efa1018285b8ff0f6dd7fe
tree3c2bf29673eb9d840eabe0e9f5c29bdcfb884bf4
parentf603807b2c8b9b8ca8a7a99e36eeb70cd39b460d
sys/dev/disk/dm: Remove dm_dev::dev_type

This is unused, and also not necessary.

dm core shouldn't need to be aware of target driver type.
Target dependent actions are handled by target dependent handlers.
dm targets have oop-like structure, so we don't want/need
dm core to be able to do things like below.

Also see d471f1f9 and 49784e7d.

switch (dev->dev_type) {
case DM_LINEAR_DEV:
    do_something_specific_to_linear(); break;
case DM_STRIPE_DEV:
    do_something_specific_to_striped(); break;
case ...:
    ...; break;
}
sys/dev/disk/dm/crypt/dm_target_crypt.c
sys/dev/disk/dm/delay/dm_target_delay.c
sys/dev/disk/dm/dm.h
sys/dev/disk/dm/dm_table.c
sys/dev/disk/dm/dm_target_error.c
sys/dev/disk/dm/dm_target_zero.c
sys/dev/disk/dm/flakey/dm_target_flakey.c
sys/dev/disk/dm/linear/dm_target_linear.c
sys/dev/disk/dm/mirror/dm_target_mirror.c
sys/dev/disk/dm/snapshot/dm_target_snapshot.c
sys/dev/disk/dm/striped/dm_target_striped.c