* scsi scan
@ 2011-11-03 20:29 K. Y. Srinivasan
2011-11-03 22:52 ` KY Srinivasan
0 siblings, 1 reply; 4+ messages in thread
From: K. Y. Srinivasan @ 2011-11-03 20:29 UTC (permalink / raw)
To: linux-scsi, james.bottomley, hch, kys
James,
On the Windows host they allow hot add/remove of block devices attached to the scsi controller(s) assigned to the guest.
So, when a hot add/remove event occurs, the host sends a message to the guest that something has changed on the hba and
the guest is responsible for figuring out what has changed: a) Setup state to manage new devices that may have been added
and b) get rid of devices that may have been removed. As I look at implementing this functionality for Linux guests,
I would need to be able to do a scan on the hba under question and deal only with whatever has changed.
Is this something that the scsi core supports or would I need to roll out a version of scan that would ignore
devices already scanned (except for the remove case) and properly add new devices that may be found.
Any guidance here would be greatly appreciated.
Regards,
K. Y
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: scsi scan
2011-11-03 20:29 scsi scan K. Y. Srinivasan
@ 2011-11-03 22:52 ` KY Srinivasan
2011-11-03 23:46 ` KY Srinivasan
2011-11-04 0:10 ` KY Srinivasan
0 siblings, 2 replies; 4+ messages in thread
From: KY Srinivasan @ 2011-11-03 22:52 UTC (permalink / raw)
To: KY Srinivasan, linux-scsi@vger.kernel.org,
james.bottomley@hansenpartnership.com, hch
> -----Original Message-----
> From: K. Y. Srinivasan [mailto:kys@microsoft.com]
> Sent: Thursday, November 03, 2011 4:29 PM
> To: linux-scsi@vger.kernel.org; james.bottomley@hansenpartnership.com;
> hch@infradead.org; KY Srinivasan
> Subject: scsi scan
>
> James,
>
> On the Windows host they allow hot add/remove of block devices attached to
> the scsi controller(s) assigned to the guest.
> So, when a hot add/remove event occurs, the host sends a message to the guest
> that something has changed on the hba and
> the guest is responsible for figuring out what has changed: a) Setup state to
> manage new devices that may have been added
> and b) get rid of devices that may have been removed. As I look at implementing
> this functionality for Linux guests,
> I would need to be able to do a scan on the hba under question and deal only
> with whatever has changed.
> Is this something that the scsi core supports or would I need to roll out a version
> of scan that would ignore
> devices already scanned (except for the remove case) and properly add new
> devices that may be found.
> Any guidance here would be greatly appreciated.
I see that the re-scan is correctly done through sysfs by writing
the string "- - -" to the scan file under /sys/class/scsi_host/*/scan.
Regards,
K. Y
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: scsi scan
2011-11-03 22:52 ` KY Srinivasan
@ 2011-11-03 23:46 ` KY Srinivasan
2011-11-04 0:10 ` KY Srinivasan
1 sibling, 0 replies; 4+ messages in thread
From: KY Srinivasan @ 2011-11-03 23:46 UTC (permalink / raw)
To: linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com,
hch@infradead.org
> -----Original Message-----
> From: KY Srinivasan
> Sent: Thursday, November 03, 2011 6:52 PM
> To: KY Srinivasan; linux-scsi@vger.kernel.org;
> james.bottomley@hansenpartnership.com; hch@infradead.org
> Subject: RE: scsi scan
>
>
> > -----Original Message-----
> > From: K. Y. Srinivasan [mailto:kys@microsoft.com]
> > Sent: Thursday, November 03, 2011 4:29 PM
> > To: linux-scsi@vger.kernel.org; james.bottomley@hansenpartnership.com;
> > hch@infradead.org; KY Srinivasan
> > Subject: scsi scan
> >
> > James,
> >
> > On the Windows host they allow hot add/remove of block devices attached to
> > the scsi controller(s) assigned to the guest.
> > So, when a hot add/remove event occurs, the host sends a message to the
> guest
> > that something has changed on the hba and
> > the guest is responsible for figuring out what has changed: a) Setup state to
> > manage new devices that may have been added
> > and b) get rid of devices that may have been removed. As I look at
> implementing
> > this functionality for Linux guests,
> > I would need to be able to do a scan on the hba under question and deal only
> > with whatever has changed.
> > Is this something that the scsi core supports or would I need to roll out a version
> > of scan that would ignore
> > devices already scanned (except for the remove case) and properly add new
> > devices that may be found.
> > Any guidance here would be greatly appreciated.
>
> I see that the re-scan is correctly done through sysfs by writing
> the string "- - -" to the scan file under /sys/class/scsi_host/*/scan.
I wish the function scsi_scan_host_selected() were an exported function.
This would address the problem I have here. Is there a reason for not
exporting this function.
Regards,
K. Y
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: scsi scan
2011-11-03 22:52 ` KY Srinivasan
2011-11-03 23:46 ` KY Srinivasan
@ 2011-11-04 0:10 ` KY Srinivasan
1 sibling, 0 replies; 4+ messages in thread
From: KY Srinivasan @ 2011-11-04 0:10 UTC (permalink / raw)
To: linux-scsi@vger.kernel.org, james.bottomley@hansenpartnership.com,
hch@infradead.org
Cc: KY Srinivasan
> -----Original Message-----
> From: KY Srinivasan
> Sent: Thursday, November 03, 2011 7:47 PM
> To: linux-scsi@vger.kernel.org; james.bottomley@hansenpartnership.com;
> hch@infradead.org
> Subject: RE: scsi scan
>
>
>
> > -----Original Message-----
> > From: KY Srinivasan
> > Sent: Thursday, November 03, 2011 6:52 PM
> > To: KY Srinivasan; linux-scsi@vger.kernel.org;
> > james.bottomley@hansenpartnership.com; hch@infradead.org
> > Subject: RE: scsi scan
> >
> >
> > > -----Original Message-----
> > > From: K. Y. Srinivasan [mailto:kys@microsoft.com]
> > > Sent: Thursday, November 03, 2011 4:29 PM
> > > To: linux-scsi@vger.kernel.org; james.bottomley@hansenpartnership.com;
> > > hch@infradead.org; KY Srinivasan
> > > Subject: scsi scan
> > >
> > > James,
> > >
> > > On the Windows host they allow hot add/remove of block devices attached
> to
> > > the scsi controller(s) assigned to the guest.
> > > So, when a hot add/remove event occurs, the host sends a message to the
> > guest
> > > that something has changed on the hba and
> > > the guest is responsible for figuring out what has changed: a) Setup state to
> > > manage new devices that may have been added
> > > and b) get rid of devices that may have been removed. As I look at
> > implementing
> > > this functionality for Linux guests,
> > > I would need to be able to do a scan on the hba under question and deal only
> > > with whatever has changed.
> > > Is this something that the scsi core supports or would I need to roll out a
> version
> > > of scan that would ignore
> > > devices already scanned (except for the remove case) and properly add new
> > > devices that may be found.
> > > Any guidance here would be greatly appreciated.
> >
> > I see that the re-scan is correctly done through sysfs by writing
> > the string "- - -" to the scan file under /sys/class/scsi_host/*/scan.
>
> I wish the function scsi_scan_host_selected() were an exported function.
> This would address the problem I have here. Is there a reason for not
> exporting this function.
Looks like I can use scsi_scan_target() to do what I need to do.
K. Y
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-04 0:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03 20:29 scsi scan K. Y. Srinivasan
2011-11-03 22:52 ` KY Srinivasan
2011-11-03 23:46 ` KY Srinivasan
2011-11-04 0:10 ` KY Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox