Re: [RFC] How to fix an async scan - rmmod race?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/11/2012 01:17 PM, Mike Christie wrote:
> For example FC drivers will call fc_remove_host which sets things up so
> no new IO can be sent to the device after that function has completed
> and will call some callouts like dev_loss_tmo_callbk to cleanup
> outstanding IO. The problem is that when it calls scsi_remove_host that

One correction. I meant to write scsi_target_remove above.

fc_remove_host sets the rport state then calls rport_delete_work which
then calls scsi_target_remove and it does callbacks like
dev_loss_tmo_callbk and terminate_rport_io. So scsi_remove_host would
not cause commands like sync cache to fail. That would be
scsi_target_remove. By the time the driver calls scsi_remove_host the
scsi_target_remove calls would have already removed the devices.

Same thing happens though. Because fc_remove_host sets the rport state
to FC_PORTSTATE_DELETED when scsi_remove_target removes the devices and
the sd.c shutdown code is run, IO from that would get failed by the fc
check ready function.


> could cause commands like cache sync from sd.c's shutdown to get failed
> (the queuecommand function will call the fc check ready function which
> will fail the IO immediately).
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux