Re: Linux Virtual SCSI HBAs and Virtual disks

Aboo Valappil
2007-01-23T22:13:11Z

Stefan Richter wrote:
> Aboo Valappil wrote:
>
>> I implemented a new IOCTL to remove this scsi_host if the user
>> process really needs to. This removal will first finish all the SCSI
>> commands (With the above status results) queued on the scsi_host (If at
>> all) and then remove the scsi_host. Also the module unload will delete
>> all the scsi_hosts created after finishing all the commands queued with
>> the above status and sense information.
>>
>
> This is a valid approach, but probably more useful would be something like:
> - userspace device server or "modprobe -r" or procfs/sysfs magic or
> whatever else requests removal of a Scsi_Host (or merely of a single
> scsi_device),
> - vscsihba enters scsi_remove_host() or scsi_remove_device(),
> - SCSI core and upper layers do whatever it takes to withdraw from
> the respective I-T(-L) nexus gracefully (e.g. synchronize cache,
> unlock drive door...),
>
Does this happen automatically when the scsi_remove_host() is called, or
I have to explicitly tell the upper layers to start shutting down
gracefully?