[dm-devel] [PATCH v5 09/22] libmultipath: functions to indicate mapping failure in /dev/shm

Hannes Reinecke hare at suse.de
Mon Apr 16 06:12:54 UTC 2018


On Sat, 14 Apr 2018 00:00:02 +0200
Martin Wilck <mwilck at suse.com> wrote:

> Create a simple API that indicates failure to create a map for a
> certain WWID. This will allow multipathd to indicate to other tools
> (in particular, "multipath -u" during udev processing) that
> an attempt to create a map for a certain wwid failed.
> 
> The indicator is simply the existence of a file under
> /dev/shm/multipath/failed_wwids. This has been chosen because it
> "survives" during pivot-root between initrd and root file system.
> 
> The exact semantics of /dev/shm/multipath/failed_wwids/$WWID is:
> "multipath or multipathd has tried to create this map from its
> members with a DM_DEVICE_CREATE call, and failed on the latest,
> or only, attempt to do so".
> 
> In particular, the existence of the file proves that here was at
> least one unsuccessful attempt to create the map since the last
> reboot. On the contrary, the non-existence of this file does not
> indicate a successful attempt - perhaps multipathd never tried to
> set up the map.
> 
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> Reviewed-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
>  libmultipath/defaults.h |   1 +
>  libmultipath/wwids.c    | 110
> ++++++++++++++++++++++++++++++++++++++++++++++++
> libmultipath/wwids.h    |  11 +++++ 3 files changed, 122 insertions(+)
> 
Reviewed-by: Hannes Reinecke <hare at suse.com>

Cheers,

Hannes




More information about the dm-devel mailing list