]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ide, scsi: Tell the block layer at request allocation time about preempt requests
authorBart Van Assche <bart.vanassche@wdc.com>
Thu, 9 Nov 2017 18:49:56 +0000 (10:49 -0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
Convert blk_get_request(q, op, __GFP_RECLAIM) into
blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not
change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Tested-by: Martin Steigerwald <martin@lichtvoll.de>
Acked-by: David S. Miller <davem@davemloft.net> [ for IDE ]
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ide/ide-pm.c
drivers/scsi/scsi_lib.c

index 544f02d673ca2717224f643742d00dc00a7e828e..f56d742908df65a45816a9bb9dfde0f380742ec9 100644 (file)
@@ -89,9 +89,9 @@ int generic_ide_resume(struct device *dev)
        }
 
        memset(&rqpm, 0, sizeof(rqpm));
-       rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
+       rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN,
+                                  BLK_MQ_REQ_PREEMPT);
        ide_req(rq)->type = ATA_PRIV_PM_RESUME;
-       rq->rq_flags |= RQF_PREEMPT;
        rq->special = &rqpm;
        rqpm.pm_step = IDE_PM_START_RESUME;
        rqpm.pm_state = PM_EVENT_ON;
index 286ea983c9e3560db7d1a8099a9c5c942b0ea675..eb129dfc2ebef6c5929b318364e966170321c87f 100644 (file)
@@ -252,9 +252,9 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
        struct scsi_request *rq;
        int ret = DRIVER_ERROR << 24;
 
-       req = blk_get_request(sdev->request_queue,
+       req = blk_get_request_flags(sdev->request_queue,
                        data_direction == DMA_TO_DEVICE ?
-                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM);
+                       REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT);
        if (IS_ERR(req))
                return ret;
        rq = scsi_req(req);
@@ -268,7 +268,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
        rq->retries = retries;
        req->timeout = timeout;
        req->cmd_flags |= flags;
-       req->rq_flags |= rq_flags | RQF_QUIET | RQF_PREEMPT;
+       req->rq_flags |= rq_flags | RQF_QUIET;
 
        /*
         * head injection *required* here otherwise quiesce won't work