Commit 9cbbdca4 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

block: remove spurious uses of REQ_HARDBARRIER



REQ_HARDBARRIER is deprecated.  Remove spurious uses in the following
users.  Please note that other than osdblk, all other uses were
already spurious before deprecation.

* osdblk: osdblk_rq_fn() won't receive any request with
  REQ_HARDBARRIER set.  Remove the test for it.

* pktcdvd: use of REQ_HARDBARRIER in pkt_generic_packet() doesn't mean
  anything.  Removed.

* aic7xxx_old: Setting MSG_ORDERED_Q_TAG on REQ_HARDBARRIER is
  spurious.  Removed.

* sas_scsi_host: Setting TASK_ATTR_ORDERED on REQ_HARDBARRIER is
  spurious.  Removed.

* scsi_tcq: The ordered tag path wasn't being used anyway.  Removed.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: Peter Osterlund <petero2@telia.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 4913efe4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -310,8 +310,7 @@ static void osdblk_rq_fn(struct request_queue *q)
			break;

		/* filter out block requests we don't understand */
		if (rq->cmd_type != REQ_TYPE_FS &&
		    !(rq->cmd_flags & REQ_HARDBARRIER)) {
		if (rq->cmd_type != REQ_TYPE_FS) {
			blk_end_request_all(rq, 0);
			continue;
		}
+0 −1
Original line number Diff line number Diff line
@@ -753,7 +753,6 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *

	rq->timeout = 60*HZ;
	rq->cmd_type = REQ_TYPE_BLOCK_PC;
	rq->cmd_flags |= REQ_HARDBARRIER;
	if (cgc->quiet)
		rq->cmd_flags |= REQ_QUIET;

+2 −19
Original line number Diff line number Diff line
@@ -2850,12 +2850,6 @@ aic7xxx_done(struct aic7xxx_host *p, struct aic7xxx_scb *scb)
      aic_dev->r_total++;
      ptr = aic_dev->r_bins;
    }
    if(cmd->device->simple_tags && cmd->request->cmd_flags & REQ_HARDBARRIER)
    {
      aic_dev->barrier_total++;
      if(scb->tag_action == MSG_ORDERED_Q_TAG)
        aic_dev->ordered_total++;
    }
    x = scb->sg_length;
    x >>= 10;
    for(i=0; i<6; i++)
@@ -10143,22 +10137,11 @@ static void aic7xxx_buildscb(struct aic7xxx_host *p, struct scsi_cmnd *cmd,
    hscb->control |= DISCENB;
    /* We always force TEST_UNIT_READY to untagged */
    if (cmd->cmnd[0] != TEST_UNIT_READY && sdptr->simple_tags)
    {
      if (req->cmd_flags & REQ_HARDBARRIER)
      {
	if(sdptr->ordered_tags)
	{
          hscb->control |= MSG_ORDERED_Q_TAG;
          scb->tag_action = MSG_ORDERED_Q_TAG;
	}
      }
      else
    {
      hscb->control |= MSG_SIMPLE_Q_TAG;
      scb->tag_action = MSG_SIMPLE_Q_TAG;
    }
  }
  }
  if ( !(aic_dev->dtr_pending) &&
        (aic_dev->needppr || aic_dev->needwdtr || aic_dev->needsdtr) &&
        (aic_dev->flags & DEVICE_DTR_SCANNED) )
+1 −12
Original line number Diff line number Diff line
@@ -130,17 +130,6 @@ static void sas_scsi_task_done(struct sas_task *task)
	sc->scsi_done(sc);
}

static enum task_attribute sas_scsi_get_task_attr(struct scsi_cmnd *cmd)
{
	enum task_attribute ta = TASK_ATTR_SIMPLE;
	if (cmd->request && blk_rq_tagged(cmd->request)) {
		if (cmd->device->ordered_tags &&
		    (cmd->request->cmd_flags & REQ_HARDBARRIER))
			ta = TASK_ATTR_ORDERED;
	}
	return ta;
}

static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
					       struct domain_device *dev,
					       gfp_t gfp_flags)
@@ -160,7 +149,7 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
	task->ssp_task.retry_count = 1;
	int_to_scsilun(cmd->device->lun, &lun);
	memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8);
	task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd);
	task->ssp_task.task_attr = TASK_ATTR_SIMPLE;
	memcpy(task->ssp_task.cdb, cmd->cmnd, 16);

	task->scatter = scsi_sglist(cmd);
+1 −5
Original line number Diff line number Diff line
@@ -97,12 +97,8 @@ static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg)
{
        struct request *req = cmd->request;
	struct scsi_device *sdev = cmd->device;

        if (blk_rq_tagged(req)) {
		if (sdev->ordered_tags && req->cmd_flags & REQ_HARDBARRIER)
        	        *msg++ = MSG_ORDERED_TAG;
        	else
		*msg++ = MSG_SIMPLE_TAG;
        	*msg++ = req->tag;
        	return 2;