Re: [PATCH 11/24] scsi: add scsi_host_get_reserved_cmd()

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

 



On 5/29/19 5:19 PM, Bart Van Assche wrote:
On 5/29/19 6:28 AM, Hannes Reinecke wrote:
+    rq = blk_mq_alloc_request(shost->reserved_cmd_q,
+                  REQ_OP_DRV_OUT | REQ_NOWAIT,
+                  BLK_MQ_REQ_RESERVED);

Is your purpose to avoid that blk_mq_alloc_request() waits? If so, why do you want to avoid that?

Typically these commands are intended for internal purposes, so there should always be enough commands free to allow direct allocation. If not we're in an error condition, and we need to return so as not to lock up the driver (as it might rely on this command to make forward progress).

The same comment as for patch 02/24 applies here: if you want to avoid that blk_mq_alloc_request() I think you need BLK_MQ_REQ_NOWAIT instead of REQ_NOWAIT.

Sure.

Cheers,

Hannes
--
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@xxxxxxx                              +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)



[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