Re: [PATCH v11 2/9] Remove get_device() / put_device() pair from scsi_request_fn()

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

 



On 06/24/13 04:36, James Bottomley wrote:
On Wed, 2013-06-12 at 14:51 +0200, Bart Van Assche wrote:
Now that all scsi_request_fn() callers hold a reference on the
SCSI device that function is invoked for

What makes you think that this is a true statement?  The usual caller is
the block layer, which doesn't really know anything about the
sdev->sdev_gendev.

The reasoning behind that comment is as follows:
* The block layer guarantees that the reference count of a request
  queue is >= 1 as long as a request_fn() call is in progress (see also
  blk_cleanup_queue(), the __blk_drain_queue() call in that function
  and the loop in __blk_drain_queue() that waits until
  request_fn_active == 0).
* The SCSI core guarantees that blk_cleanup_queue() is invoked before
  the final put on sdev->sdev_gendev.

Bart.

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