You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
scsi: use host wide tags by default
This patch changes the !blk-mq path to the same defaults as the blk-mq I/O path by always enabling block tagging, and always using host wide tags. We've had blk-mq available for a few releases so bugs with this mode should have been ironed out, and this ensures we get better coverage of over tagging setup over different configs. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
committed by
James Bottomley
parent
720ba808e9
commit
64d513ac31
@@ -3689,9 +3689,6 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
|
||||
*/
|
||||
shost->max_host_blocked = 1;
|
||||
|
||||
if (scsi_init_shared_tag_map(shost, host->n_tags))
|
||||
goto err_add;
|
||||
|
||||
rc = scsi_add_host_with_dma(ap->scsi_host,
|
||||
&ap->tdev, ap->host->dev);
|
||||
if (rc)
|
||||
|
||||
@@ -2750,7 +2750,6 @@ static struct scsi_host_template srp_template = {
|
||||
.cmd_per_lun = SRP_DEFAULT_CMD_SQ_SIZE,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = srp_host_attrs,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
@@ -3181,10 +3180,6 @@ static ssize_t srp_create_target(struct device *dev,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = scsi_init_shared_tag_map(target_host, target_host->can_queue);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
target->req_ring_size = target->queue_size - SRP_TSK_MGMT_SQ_SIZE;
|
||||
|
||||
if (!srp_conn_unique(target->srp_host, target)) {
|
||||
|
||||
@@ -1994,7 +1994,6 @@ static struct scsi_host_template mptsas_driver_template = {
|
||||
.cmd_per_lun = 7,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = mptscsih_host_attrs,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
static int mptsas_get_linkerrors(struct sas_phy *phy)
|
||||
|
||||
@@ -325,7 +325,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
|
||||
tpnt->slave_destroy = NCR_700_slave_destroy;
|
||||
tpnt->slave_alloc = NCR_700_slave_alloc;
|
||||
tpnt->change_queue_depth = NCR_700_change_queue_depth;
|
||||
tpnt->use_blk_tags = 1;
|
||||
|
||||
if(tpnt->name == NULL)
|
||||
tpnt->name = "53c700";
|
||||
@@ -1107,7 +1106,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
|
||||
BUG();
|
||||
}
|
||||
if(hostdata->msgin[1] == A_SIMPLE_TAG_MSG) {
|
||||
struct scsi_cmnd *SCp = scsi_find_tag(SDp, hostdata->msgin[2]);
|
||||
struct scsi_cmnd *SCp;
|
||||
|
||||
SCp = scsi_host_find_tag(SDp->host, hostdata->msgin[2]);
|
||||
if(unlikely(SCp == NULL)) {
|
||||
printk(KERN_ERR "scsi%d: (%d:%d) no saved request for tag %d\n",
|
||||
host->host_no, reselection_id, lun, hostdata->msgin[2]);
|
||||
@@ -1119,7 +1120,9 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
|
||||
"reselection is tag %d, slot %p(%d)\n",
|
||||
hostdata->msgin[2], slot, slot->tag);
|
||||
} else {
|
||||
struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG);
|
||||
struct scsi_cmnd *SCp;
|
||||
|
||||
SCp = scsi_host_find_tag(SDp->host, SCSI_NO_TAG);
|
||||
if(unlikely(SCp == NULL)) {
|
||||
sdev_printk(KERN_ERR, SDp,
|
||||
"no saved request for untagged cmd\n");
|
||||
@@ -1823,7 +1826,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
|
||||
slot->tag, slot);
|
||||
} else {
|
||||
slot->tag = SCSI_NO_TAG;
|
||||
/* must populate current_cmnd for scsi_find_tag to work */
|
||||
/* must populate current_cmnd for scsi_host_find_tag to work */
|
||||
SCp->device->current_cmnd = SCp;
|
||||
}
|
||||
/* sanity check: some of the commands generated by the mid-layer
|
||||
|
||||
@@ -10819,7 +10819,6 @@ static struct scsi_host_template advansys_template = {
|
||||
* by enabling clustering, I/O throughput increases as well.
|
||||
*/
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
static int advansys_wide_init_chip(struct Scsi_Host *shost)
|
||||
@@ -11211,11 +11210,6 @@ static int advansys_board_found(struct Scsi_Host *shost, unsigned int iop,
|
||||
/* Set maximum number of queues the adapter can handle. */
|
||||
shost->can_queue = adv_dvc_varp->max_host_qng;
|
||||
}
|
||||
ret = scsi_init_shared_tag_map(shost, shost->can_queue);
|
||||
if (ret) {
|
||||
shost_printk(KERN_ERR, shost, "init tag map failed\n");
|
||||
goto err_free_dma;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the maximum number of scatter-gather elements the
|
||||
|
||||
@@ -925,7 +925,6 @@ struct scsi_host_template aic79xx_driver_template = {
|
||||
.slave_configure = ahd_linux_slave_configure,
|
||||
.target_alloc = ahd_linux_target_alloc,
|
||||
.target_destroy = ahd_linux_target_destroy,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
/******************************** Bus DMA *************************************/
|
||||
|
||||
@@ -812,7 +812,6 @@ struct scsi_host_template aic7xxx_driver_template = {
|
||||
.slave_configure = ahc_linux_slave_configure,
|
||||
.target_alloc = ahc_linux_target_alloc,
|
||||
.target_destroy = ahc_linux_target_destroy,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
/**************************** Tasklet Handler *********************************/
|
||||
|
||||
@@ -73,7 +73,6 @@ static struct scsi_host_template aic94xx_sht = {
|
||||
.eh_bus_reset_handler = sas_eh_bus_reset_handler,
|
||||
.target_destroy = sas_target_destroy,
|
||||
.ioctl = sas_ioctl,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -800,7 +800,6 @@ struct scsi_host_template bfad_im_scsi_host_template = {
|
||||
.shost_attrs = bfad_im_host_attrs,
|
||||
.max_sectors = BFAD_MAX_SECTORS,
|
||||
.vendor_id = BFA_PCI_VENDOR_ID_BROCADE,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
struct scsi_host_template bfad_im_vport_template = {
|
||||
@@ -822,7 +821,6 @@ struct scsi_host_template bfad_im_vport_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = bfad_im_vport_attrs,
|
||||
.max_sectors = BFAD_MAX_SECTORS,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
bfa_status_t
|
||||
|
||||
@@ -2867,7 +2867,6 @@ static struct scsi_host_template bnx2fc_shost_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.sg_tablesize = BNX2FC_MAX_BDS_PER_CMD,
|
||||
.max_sectors = 1024,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -2283,7 +2283,6 @@ struct scsi_host_template csio_fcoe_shost_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = csio_fcoe_lport_attrs,
|
||||
.max_sectors = CSIO_MAX_SECTOR_SIZE,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
struct scsi_host_template csio_fcoe_shost_vport_template = {
|
||||
@@ -2303,7 +2302,6 @@ struct scsi_host_template csio_fcoe_shost_vport_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = csio_fcoe_vport_attrs,
|
||||
.max_sectors = CSIO_MAX_SECTOR_SIZE,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -256,7 +256,6 @@ static struct scsi_host_template driver_template = {
|
||||
.proc_name = ESAS2R_DRVR_NAME,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.max_sectors = 0xFFFF,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
int sgl_page_size = 512;
|
||||
|
||||
@@ -2694,7 +2694,6 @@ struct scsi_host_template scsi_esp_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.max_sectors = 0xffff,
|
||||
.skip_settle_delay = 1,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
EXPORT_SYMBOL(scsi_esp_template);
|
||||
|
||||
|
||||
@@ -287,7 +287,6 @@ static struct scsi_host_template fcoe_shost_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.sg_tablesize = SG_ALL,
|
||||
.max_sectors = 0xffff,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -118,7 +118,6 @@ static struct scsi_host_template fnic_host_template = {
|
||||
.sg_tablesize = FNIC_MAX_SG_DESC_CNT,
|
||||
.max_sectors = 0xffff,
|
||||
.shost_attrs = fnic_attrs,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
@@ -697,13 +696,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
}
|
||||
fnic->fnic_max_tag_id = host->can_queue;
|
||||
|
||||
err = scsi_init_shared_tag_map(host, fnic->fnic_max_tag_id);
|
||||
if (err) {
|
||||
shost_printk(KERN_ERR, fnic->lport->host,
|
||||
"Unable to alloc shared tag map\n");
|
||||
goto err_out_dev_close;
|
||||
}
|
||||
|
||||
host->max_lun = fnic->config.luns_per_tgt;
|
||||
host->max_id = FNIC_MAX_FCP_TARGET;
|
||||
host->max_cmd_len = FCOE_MAX_CMD_LEN;
|
||||
|
||||
@@ -217,6 +217,13 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
|
||||
error = scsi_mq_setup_tags(shost);
|
||||
if (error)
|
||||
goto fail;
|
||||
} else {
|
||||
shost->bqt = blk_init_tags(shost->can_queue,
|
||||
shost->hostt->tag_alloc_policy);
|
||||
if (!shost->bqt) {
|
||||
error = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-9
@@ -4983,7 +4983,6 @@ static int hpsa_scan_finished(struct Scsi_Host *sh,
|
||||
static int hpsa_scsi_host_alloc(struct ctlr_info *h)
|
||||
{
|
||||
struct Scsi_Host *sh;
|
||||
int error;
|
||||
|
||||
sh = scsi_host_alloc(&hpsa_driver_template, sizeof(h));
|
||||
if (sh == NULL) {
|
||||
@@ -5004,14 +5003,7 @@ static int hpsa_scsi_host_alloc(struct ctlr_info *h)
|
||||
sh->hostdata[0] = (unsigned long) h;
|
||||
sh->irq = h->intr[h->intr_mode];
|
||||
sh->unique_id = sh->irq;
|
||||
error = scsi_init_shared_tag_map(sh, sh->can_queue);
|
||||
if (error) {
|
||||
dev_err(&h->pdev->dev,
|
||||
"%s: scsi_init_shared_tag_map failed for controller %d\n",
|
||||
__func__, h->ctlr);
|
||||
scsi_host_put(sh);
|
||||
return error;
|
||||
}
|
||||
|
||||
h->scsi_host = sh;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3095,7 +3095,6 @@ static struct scsi_host_template driver_template = {
|
||||
.max_sectors = IBMVFC_MAX_SECTORS,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = ibmvfc_attrs,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -6502,7 +6502,6 @@ static struct scsi_host_template driver_template = {
|
||||
.shost_attrs = ipr_ioa_attrs,
|
||||
.sdev_attrs = ipr_dev_attrs,
|
||||
.proc_name = IPR_NAME,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -170,7 +170,6 @@ static struct scsi_host_template isci_sht = {
|
||||
.target_destroy = sas_target_destroy,
|
||||
.ioctl = sas_ioctl,
|
||||
.shost_attrs = isci_host_attrs,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user