Re: [PATCH 3/6] scsi: do not manipulate device reference counts in scsi_get/put_command

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

 



On Wed, Feb 12, 2014 at 12:37:26PM +0100, Hannes Reinecke wrote:
> But this decouples the scsi_device refcount from the number of
> outstanding commands, right?

We still take a reference for each command in scsi_get_cmd_from_req,
which is helper used in each prep_fn, so we still have a reference
for each command.  The big simplication is that we avoid useless
roundtrips on the reference count during I/O completion by not hiding
them in unrelated functions.

> While I'm sure you've audited all call sites, it's now up to the
> callers to provide proper reference counting.
> Shouldn't we document it somewhere?

Not sure what'd we would want to document.  We grab a reference when
first getting the command from the block layer, and drop it when
finishing the command.  We could write this setence down somewhere if it
really helps people, but I'm not sure where a good place for that would
be.

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