scsi: storvsc: Re-init stor_chns when a channel interrupt is re-assigned For each storvsc_device, storvsc keeps track of the channel target CPUs associated to the device (alloced_cpus) and it uses this information to fill a "cache" (stor_chns) mapping CPU->channel according to a certain heuristic. Update the alloced_cpus mask and the stor_chns array when a channel of the storvsc device is re-assigned to a different CPU. Signed-off-by: Andrea Parri (Microsoft) <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by; Long Li <[email protected]> Reviewed-by: Michael Kelley <[email protected]> [ wei: fix a small issue reported by kbuild test robot <[email protected]> ] Signed-off-by: Wei Liu <[email protected]>
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index b85d7580..cd64ab7b 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h
@@ -773,6 +773,9 @@ struct vmbus_channel { void (*onchannel_callback)(void *context); void *channel_callback_context; + void (*change_target_cpu_callback)(struct vmbus_channel *channel, + u32 old, u32 new); + /* * Synchronize channel scheduling and channel removal; see the inline * comments in vmbus_chan_sched() and vmbus_reset_channel_cb().