Comment 17 for bug 737027

Revision history for this message
Phillip Susi (psusi) wrote :

The '-part' is an argument to the '-p' switch, so it also needs removed from the kpartx command, and needs to follow the '-p' switch to dmraid, if that switch is added there, but I do not think it should be, for the same reason that it should be removed from kpartx.

The reason that dmraid handles the partitions itself instead of allowing kpartx to do it is because when it deactivates an array, it must remove the partitions first, therefore, it must parse the partition tables to figure out which partitions need removed. This needs resolved before the partition handling can be removed from dmraid and kpartx relied on to do it instead.

Unfortunately, the kernel currently lacks a mechanism to propagate a removal request or a surprise removal notice up the device stack, which dmraid would need to properly tear down the dmraid device. Without that, it can not properly handle device shutdown without its partition code ( and can't handle it properly even as it is now, if the partition is part of LVM ).