Re: [PATCH 7/8] SCSI: add a field to scsi_device to count open file references

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

 



Alan Stern wrote:
On Tue, 4 Mar 2008, Stefan Richter wrote:
[drivers/scsi/scsi.c]

  int scsi_device_get(struct scsi_device *sdev)
  {
...
+	if (sdev->host->hostt->slave_sdev_get)
+		err = sdev->host->hostt->slave_sdev_get(sdev);
...
and equivalent additions to scsi_device_put().

On second thought, I'm not so sure this would work the way I want. scsi_device_get() ends up being called for all sorts of extra things unrelated to device opens. For instance, scsi_probe_and_add_lun() calls it whenever a new LUN is discovered.

True.

Would it be acceptable to add a similar pair of callbacks to the host
template, invoked by the upper-level driver's open and release
routines?

This would actually be nice for that sbp2 thing which I mentioned as well.
--
Stefan Richter
-=====-==--- --== --=-=
http://arcgraph.de/sr/
--
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