Add an empty function scsi_multipath_dev_rescan() to handle sdev rescans. It should handle ALUA reconfiguration, and that will be possible when the core ALUA driver can handle that.
Signed-off-by: John Garry <[email protected]> --- drivers/scsi/scsi_multipath.c | 6 ++++++ drivers/scsi/scsi_scan.c | 2 ++ include/scsi/scsi_multipath.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/drivers/scsi/scsi_multipath.c b/drivers/scsi/scsi_multipath.c index 2b916c7af4bd7..97d835f1b6aaf 100644 --- a/drivers/scsi/scsi_multipath.c +++ b/drivers/scsi/scsi_multipath.c @@ -539,6 +539,12 @@ static int scsi_mpath_ua_thread(void *data) return 0; } +void scsi_multipath_dev_rescan(struct scsi_device *sdev) +{ + /* Handle ALUA reconfig */ + dev_warn_once(&sdev->sdev_gendev, "mulitpath rescan not handled\n"); +} + static struct scsi_mpath_head *scsi_mpath_alloc_head(void) { struct scsi_mpath_head *scsi_mpath_head; diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index e22d3245d4b65..bf602daeac1db 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1743,6 +1743,8 @@ int scsi_rescan_device(struct scsi_device *sdev) if (sdev->handler && sdev->handler->rescan) sdev->handler->rescan(sdev); + else if (sdev->scsi_mpath_dev) + scsi_multipath_dev_rescan(sdev); if (dev->driver && try_module_get(dev->driver->owner)) { struct scsi_driver *drv = to_scsi_driver(dev->driver); diff --git a/include/scsi/scsi_multipath.h b/include/scsi/scsi_multipath.h index d30f2c41e17de..9dc02a56e6342 100644 --- a/include/scsi/scsi_multipath.h +++ b/include/scsi/scsi_multipath.h @@ -78,6 +78,7 @@ void scsi_mpath_add_sysfs_link(struct scsi_device *sdev); void scsi_mpath_remove_sysfs_link(struct scsi_device *sdev); int scsi_mpath_get_head(struct scsi_mpath_head *); void scsi_mpath_put_head(struct scsi_mpath_head *); +void scsi_multipath_dev_rescan(struct scsi_device *sdev); static inline void scsi_mpath_start_request(struct request *req) { @@ -156,5 +157,8 @@ static inline void scsi_mpath_add_sysfs_link(struct scsi_device *sdev) static inline void scsi_mpath_remove_sysfs_link(struct scsi_device *sdev) { } +static inline void scsi_multipath_dev_rescan(struct scsi_device *sdev) +{ +} #endif /* CONFIG_SCSI_MULTIPATH */ #endif /* _SCSI_SCSI_MULTIPATH_H */ -- 2.43.5

