Commit 039c635f4e666b647df2100038de276a83fb3fca

Authored by Bart Van Assche
Committed by Jens Axboe
1 parent 1b6d65a0bf

ide, scsi: Tell the block layer at request allocation time about preempt requests

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>

Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff

drivers/ide/ide-pm.c
... ... @@ -89,9 +89,9 @@
89 89 }
90 90  
91 91 memset(&rqpm, 0, sizeof(rqpm));
92   - rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
  92 + rq = blk_get_request_flags(drive->queue, REQ_OP_DRV_IN,
  93 + BLK_MQ_REQ_PREEMPT);
93 94 ide_req(rq)->type = ATA_PRIV_PM_RESUME;
94   - rq->rq_flags |= RQF_PREEMPT;
95 95 rq->special = &rqpm;
96 96 rqpm.pm_step = IDE_PM_START_RESUME;
97 97 rqpm.pm_state = PM_EVENT_ON;
drivers/scsi/scsi_lib.c
... ... @@ -252,9 +252,9 @@
252 252 struct scsi_request *rq;
253 253 int ret = DRIVER_ERROR << 24;
254 254  
255   - req = blk_get_request(sdev->request_queue,
  255 + req = blk_get_request_flags(sdev->request_queue,
256 256 data_direction == DMA_TO_DEVICE ?
257   - REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM);
  257 + REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_MQ_REQ_PREEMPT);
258 258 if (IS_ERR(req))
259 259 return ret;
260 260 rq = scsi_req(req);
... ... @@ -268,7 +268,7 @@
268 268 rq->retries = retries;
269 269 req->timeout = timeout;
270 270 req->cmd_flags |= flags;
271   - req->rq_flags |= rq_flags | RQF_QUIET | RQF_PREEMPT;
  271 + req->rq_flags |= rq_flags | RQF_QUIET;
272 272  
273 273 /*
274 274 * head injection *required* here otherwise quiesce won't work