[dm-devel] [PATCH v2] multipath: return failure on an invalid remove command

Martin Wilck martin.wilck at suse.com
Thu Mar 31 10:25:57 UTC 2022


On Wed, 2022-03-30 at 15:14 -0500, Benjamin Marzinski wrote:
> When "multipath -f" is run on a device that doesn't exist or isn't a
> multipath device, the command will not remove any device, but it will
> still return success.  Multiple functions rely on _dm_flush_map()
> returning success when called with name that doesn't match any
> multipath device. So before calling _dm_flush_map(), call
> dm_is_mpath(),
> to check if the device exists and is a multipath device, and return
> failure if it's not.
> 
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

Reviewed-by: Martin Wilck <mwilck at suse.com>



More information about the dm-devel mailing list