Skip USB devices

multipath will detect USB devices as valid, even though it's
pretty much pointless trying to do multipath on USB.

References: bnc#865577

Signed-off-by: Hannes Reinecke <hare@suse.de>
kpartx: handle more than 256 loop devices

Update the loop handling code to support more than 256
devices.

References: bnc#898427

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: do not fail path_discovery()

path_discovery() cannot really fail; it just will try to detect
paths. So make this a void function and update the callers.

References: bnc#865577

Signed-off-by: Hannes Reinecke <hare@suse.de>
devmapper: do not flush I/O for DM_DEVICE_CREATE

DM_DEVICE_CREATE loads a new table, so there cannot be any
I/O pending. Hence we should be setting the 'no flush'
and 'skip lockfs' flag to avoid delays during creation.

Signed-off-by: Hannes Reinecke <hare@suse.de>
kpartx: Fixup find_unused_loop_device for sles11

On SLES11 the ioctl LOOP_CTL_GET_FREE isn't implemented, so
look into sysfs instead.

References: bnc#898427

Signed-off-by: Hannes Reinecke <hare@suse.de>
kpartx: use standard 'major' and 'minor' macros

Instead of hand-coding our own versions we should be using the
standard 'major' and 'minor' macros.
Otherwise higher minor numbers will not be referenced correctly.

References: bnc#898427

Signed-off-by: Hannes Reinecke <hare@suse.de>