[PATCH 0/2] fix the lifetime of sas bsg objects

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

 



This patchset is a replacement for:

http://marc.info/?l=linux-scsi&m=120753407109400&w=2

The problem is that we call blk_cleanup_queue too early for bsg queues
for SAS. We need to call blk_cleanup_queue in the release function as
we do with scsi devices.

A sas_host device doesn't have the release function so the previous
patch adds struct device to struct sas_host_attrs.

On IRC, James tolds me that kref would make things simpler.

This patchset adds release callback support to bsg, which is called
when a bsg device goes away. bsg_register_queue() takes a pointer to a
callback function. Objects like sas_host that can't use the release
callback in struct device can use this feature.

bsg internally uses kref for refcounts on bsg devices instead of
get/put_device in fops->open/release. bsg calls put_device and the
caller's release callback (if it was registered) in kref_put's
release.

This patchset against scsi-post-merge since there are some changes to
scsi_transport_sas in scsi-post-merge. This patchset also depends on
the bsg fixes for scsi devices:

http://marc.info/?l=linux-scsi&m=120692552424155&w=2

The bsg fixes for scsi devices needs to be applied to scsi-misc first,
scsi-post-merge needs to be rebased, then this patch can be applied.

James, let me know if you want me send all the floating bsg patches
against scsi-post-merge.


--
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