Mike Snitzer 169e2cc279 dm: allow error target to replace bio-based and request-based targets
It may be useful to switch a request-based table to the "error" target.
Enhance the DM core to allow a hybrid target_type which is capable of
handling either bios (via .map) or requests (via .map_rq).

Add a request-based map function (.map_rq) to the "error" target_type;
making it DM's first hybrid target.  Train dm_table_set_type() to prefer
the mapped device's established type (request-based or bio-based).  If
the mapped device doesn't have an established type default to making the
table with the hybrid target(s) bio-based.

Tested 'dmsetup wipe_table' to work on both bio-based and request-based
devices.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2013-09-05 20:46:05 -04:00
..
2013-03-01 22:45:51 +00:00
2013-03-01 22:45:51 +00:00
2012-03-28 18:41:29 +01:00
2013-03-01 22:45:51 +00:00
2013-08-23 09:02:13 -04:00
2013-07-10 23:41:18 +01:00
2013-08-23 09:02:13 -04:00
2012-07-30 17:25:16 -07:00
2013-08-23 09:02:13 -04:00
2013-07-10 23:41:19 +01:00
2007-10-20 02:01:26 +01:00
2013-07-10 23:41:17 +01:00
2013-03-01 22:45:47 +00:00
2013-08-23 09:02:13 -04:00
2013-03-23 14:15:29 -07:00
2013-07-10 23:41:19 +01:00
2013-03-23 14:15:29 -07:00
2013-07-10 23:41:19 +01:00
2013-07-25 16:46:53 +10:00