Skip to content

Commit 039c635

Browse files
KAGA-KOKOaxboe
authored andcommitted
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>
1 parent 1b6d65a commit 039c635

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/ide/ide-pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ int generic_ide_resume(struct device *dev)
8989
}
9090

9191
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);
9394
ide_req(rq)->type = ATA_PRIV_PM_RESUME;
94-
rq->rq_flags |= RQF_PREEMPT;
9595
rq->special = &rqpm;
9696
rqpm.pm_step = IDE_PM_START_RESUME;
9797
rqpm.pm_state = PM_EVENT_ON;

drivers/scsi/scsi_lib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
252252
struct scsi_request *rq;
253253
int ret = DRIVER_ERROR << 24;
254254

255-
req = blk_get_request(sdev->request_queue,
255+
req = blk_get_request_flags(sdev->request_queue,
256256
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);
258258
if (IS_ERR(req))
259259
return ret;
260260
rq = scsi_req(req);
@@ -268,7 +268,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
268268
rq->retries = retries;
269269
req->timeout = timeout;
270270
req->cmd_flags |= flags;
271-
req->rq_flags |= rq_flags | RQF_QUIET | RQF_PREEMPT;
271+
req->rq_flags |= rq_flags | RQF_QUIET;
272272

273273
/*
274274
* head injection *required* here otherwise quiesce won't work

0 commit comments

Comments
 (0)