[dm-devel] [PATCH] dm: avoid filesystem lookup in dm_get_dev_t()

Martin Wilck mwilck at suse.com
Thu Dec 10 17:11:49 UTC 2020


On Thu, 2020-12-10 at 10:24 +0100, Hannes Reinecke wrote:
> dm_get_dev_t() is just used to convert an arbitrary 'path' string
> into a dev_t. It doesn't presume that the device is present; that
> check will be done later, as the only caller is dm_get_device(),
> which does a dm_get_table_device() later on, which will properly
> open the device.
> So if the path string already _is_ in major:minor representation
> we can convert it directly, avoiding a recursion into the filesystem
> to lookup the block device.
> This avoids a hang in multipath_message() when the filesystem is
> inaccessible.
> 
> Signed-off-by: Hannes Reinecke <hare at suse.de>

Ack, although I believe the scsi/__GENKSYMS__ part doesn't belong here.

Note that this is essentially a revert/fix of 644bda6f3460 ("dm table:
fall back to getting device using name_to_dev_t()"). Added the author
of that patch to CC.

Martin





More information about the dm-devel mailing list