It seems very un-posix like to not be able to remove a dm mapped device file even when the mapped device is open. Why shouldn't the kernel's reference counting for the mapped device's md structure account for properly handling the de-allocation of the md structure upon the last close in this case?