Re: [PATCH 0/2] sg: fix races during device removal (v2)

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

 



I wrote:
> One number is
>   - the number of unfinished transactions (request->response)
> of an sg device. [...] The other number is
>   - the number of contexts which peek and poke at the device
> representation's memory. [...]
> And we need one more thing to finally get all pieces together:  A state
> flag which says "device still open? yes/no".  This flag is necessary to
> decide when to take the device representation out of the idr:

You probably don't need an explicit counter of pending transactions.
This number is implicit in the number of list members in struct
sg_fd.headrp.

So you only need the reference counter and the open-or-closed flag
(which would be different from struct sg_fd.closed).
-- 
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