Bug 196493

Summary: When LUN assignments on the target was changed, event must be triggered
Product: IO/Storage Reporter: Dmitry Svyatogorov (ds)
Component: SCSIAssignee: linux-scsi (linux-scsi)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.13…4.4 and probably all other Subsystem:
Regression: No Bisected commit-id:

Description Dmitry Svyatogorov 2017-07-26 09:31:08 UTC
1. The (e.g. SAN) device is unmapped and then the same LUN is reused by other WWN, but no actions taken on linux-side.
2. Kernel receives indication and claims "Kernel: [15671249.097583] sd 8:0:15:9: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatically remap LUN assignments."
3. Observe no further actions at kernel-side. ioctl (requested via blockdev) returns parameters of unmapped LUN.

Expect at least to cock the trigger on respective device (like mapped to sysfs "/sys/block/sd*/device/evt_lun_change_reported") and thus provide the mechanism to inform device mapper. In perspective, the feature of auto-invalidation and rescan on changed path.