Re: [PATCH 2/2] libata: use generic taging

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

 



> +struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev, int tag)
>  {
>  	struct ata_port *ap = dev->link->ap;
>  	struct ata_queued_cmd *qc;
>  
> +	/* no command while frozen */
> +	if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
> +		return NULL;
>  
> +	qc = __ata_qc_from_tag(ap, tag);

It would be more useful to allocate the ata_queued_cmd as part of
the request/scsi_cmnd, and dip into the reserved pool for internal
commands.

Also note that tags are per-host which probably breaks the indexing 
scheme to look up the commands from ap->qcmd.

> @@ -3711,6 +3711,8 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
>  						 NULL);
>  			if (!IS_ERR(sdev)) {
>  				dev->sdev = sdev;
> +				blk_queue_resize_tags(sdev->request_queue,
> +					ap->host->n_tags);

Never call blk_queue_resize_tags directly from a SCSI LLDD, and use
the scsi_change_queue_depth API instead.  Also remember that for
blk-mq you can't grow the tag map after allocation.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux