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]

 



On Mon, 2008-03-03 at 15:16 -0500, Alan Stern wrote:
> This patch (as1050) adds a new field to struct scsi_device, to keep a
> count of the number of block-device open file references.  This count
> will be used by usb-storage to determine whether USB-PERSIST should be
> forced on during a suspend.

I don't think this does what's advertised if you mean it to keep a count
as the atomics seem to imply. (->open is only called on first open and
->release on last close.  openers was a historical 2.4 field that used
to count opens but now just flags whether sd is open or not.

Secondly, if you really want an openers count (which I remember SCSI
rendering a bad idea ages ago), that's held in struct block_device as
openers, isn't it?  So there's no need to duplicate this in SCSI.

James


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