Re: [PATCH 06/24] virtio_scsi: use reserved commands for TMF

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

 



On 5/30/19 2:35 PM, John Garry wrote:
On 29/05/2019 14:28, Hannes Reinecke wrote:

 static int virtscsi_map_queues(struct Scsi_Host *shost)
@@ -827,6 +830,8 @@ static int virtscsi_probe(struct virtio_device *vdev)
     shost->max_channel = 0;
     shost->max_cmd_len = VIRTIO_SCSI_CDB_SIZE;
     shost->nr_hw_queues = num_queues;
+    shost->can_queue -= VIRTIO_SCSI_RESERVED_CMDS;

shost->can_queue is already referenced after it is set earlier in virtscsi_probe(), so I wonder if this is ok to later revise it? See:

shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue);

Yeah, I think it is correct.
But I'll be checking.

Cheers,

Hannes



[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