[PATCH] nvme: generate uevent once a multipath namespace is operational again

Christoph Hellwig hch at lst.de
Thu May 6 08:37:40 BST 2021


On Wed, May 05, 2021 at 12:33:05PM +0200, Hannes Reinecke wrote:
> In an all paths down scenario I/O will be requeued or aborted, so no
> further I/O will be ongoing on this namespace.
> This leaves upper layers like MD unable to determine if the namespace
> becomes operational again after a successful controller reset.
> This patch will send an uevent per multipathed namespace once the
> underlying controller is LIVE, allowing MD to start resync.

Do we have any documentation or other exampes for this KOBJ_CHANGED
magic?  I've seen it in a few places, but it always seemed rather
cargo cult to me.  If you have a more insights any chance you could
document it?

> +		if (ctrl->state == NVME_CTRL_LIVE)
> +			kobject_uevent(&disk_to_dev(ns->head->disk)->kobj,
> +				       KOBJ_CHANGE);

Also this should probably use disk_uevent to also notify partitions.
Maybe also for other existing callers.



More information about the Linux-nvme mailing list