Re: [PATCH 05/48] hpsa: correct change_queue_depth

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

 



On Wed, Jan 14, 2015 at 04:00:00PM -0600, Don Brace wrote:
> scsi_adjust_queue_depth was changed to scsi_change_queue_depth

That's not a very good dscription..

> +static int hpsa_change_queue_depth(struct scsi_device *sdev, int qdepth)
> +{
> +	struct ctlr_info *h = sdev_to_hba(sdev);
> +
> +	if (qdepth < 1)
> +		qdepth = 1;
> +	else
> +		if (qdepth > h->nr_cmds)
> +			qdepth = h->nr_cmds;
> +	scsi_change_queue_depth(sdev, qdepth);
> +	return sdev->queue_depth;
> +}

Why do you need this method?  scsi_change_queue_depth checks for
host->can_queue, which is initialized from h->nr_cmds, as well as
for depth <= 0 and rejects the change.
--
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