[RFC 1/2] fix our current target reap infrastructure

2014-01-02 Thread James Bottomley
This patch eliminates the reap_ref and replaces it with a proper kref. On last put of this kref, the target is removed from visibility in sysfs. The final call to scsi_target_reap() for the device is done from __scsi_remove_device() and only if the device was made visible. This ensures that the t

Re: [RFC 1/2] fix our current target reap infrastructure.

2013-12-17 Thread James Bottomley
On Mon, 2013-12-16 at 10:57 -0500, Alan Stern wrote: > On Mon, 16 Dec 2013, James Bottomley wrote: > > > This patch eliminates the reap_ref and replaces it with a proper kref. > > On last put of this kref, the target is removed from visibility in > > sysfs. The final call to scsi_target_reap() f

Re: [RFC 1/2] fix our current target reap infrastructure.

2013-12-16 Thread Alan Stern
On Mon, 16 Dec 2013, James Bottomley wrote: > This patch eliminates the reap_ref and replaces it with a proper kref. > On last put of this kref, the target is removed from visibility in > sysfs. The final call to scsi_target_reap() for the device is done from > __scsi_remove_device() and only if

[RFC 1/2] fix our current target reap infrastructure.

2013-12-16 Thread James Bottomley
This patch eliminates the reap_ref and replaces it with a proper kref. On last put of this kref, the target is removed from visibility in sysfs. The final call to scsi_target_reap() for the device is done from __scsi_remove_device() and only if the device was made visible. This ensures that the t