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