]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] hpsa: only allow REQ_TYPE_FS to use fast path
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Tue, 18 Feb 2014 19:55:22 +0000 (13:55 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:03 +0000 (10:19 -0700)
When commands sent down the "fast path" fail, they must be re-tried down the
normal RAID path.  We do this by kicking i/o's back to the scsi mid layer with
a DID_SOFT_ERROR status, which causes them to be retried.  This won't work for
SG_IO's and other non REQ_TYPE_FS i/o's which could get kicked all the way back
to the application, which may have no idea that the command needs resubmitting
and likely no way to resubmit it in such a way the that driver can recognize it
as a resubmit and send it down the normal RAID path.  So we just always send
non REQ_TYPE_FS i/o's down the normal RAID path, never down the "fast path".

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hpsa.c

index 4047c37aa4f8349d13595abfd8ef762c2f075913..6e97f05bd49347919d2afa1c204fb576acb0ae36 100644 (file)
@@ -2330,7 +2330,8 @@ static int hpsa_scsi_queue_command_lck(struct scsi_cmnd *cmd,
        if ((likely(h->transMethod & CFGTBL_Trans_io_accel1)) &&
                (dev->ioaccel_handle) &&
                ((cmd->cmnd[0] == READ_10) || (cmd->cmnd[0] == WRITE_10)) &&
-               (scsi_sg_count(cmd) <= IOACCEL1_MAXSGENTRIES))
+               (scsi_sg_count(cmd) <= IOACCEL1_MAXSGENTRIES) &&
+               likely(cmd->request->cmd_type == REQ_TYPE_FS))
                return hpsa_scsi_ioaccel_queue_command(h, c);
 
        c->Header.ReplyQueue = 0;  /* unused in simple mode */