mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst_lib: Port to Linux kernel v5.19
Support for the following block layer changes in the Linux Kernel v5.19:
- e2e530867245 ("blk-mq: remove the done argument to blk_execute_rq_nowait")
This commit is contained in:
@@ -178,23 +178,28 @@ static inline unsigned int scst_blk_rq_cpu(struct request *rq)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0)
|
||||
/*
|
||||
* See also commit b84ba30b6c7a ("block: remove the gendisk argument to
|
||||
* blk_execute_rq") # v5.17.
|
||||
* See also commit e2e530867245 ("blk-mq: remove the done argument to
|
||||
* blk_execute_rq_nowait") # v5.19.
|
||||
*/
|
||||
static inline
|
||||
void blk_execute_rq_nowait_backport(struct request *rq, bool at_head,
|
||||
rq_end_io_fn *done)
|
||||
void blk_execute_rq_nowait_backport(struct request *rq, bool at_head)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
|
||||
/*
|
||||
* See also commit 8eeed0b554b9 ("block: remove unnecessary argument from
|
||||
* blk_execute_rq_nowait") # v5.12.
|
||||
*/
|
||||
blk_execute_rq_nowait(rq->q, NULL, rq, at_head, done);
|
||||
blk_execute_rq_nowait(rq->q, NULL, rq, at_head, NULL);
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
/*
|
||||
* See also commit b84ba30b6c7a ("block: remove the gendisk argument to
|
||||
* blk_execute_rq") # v5.17.
|
||||
*/
|
||||
blk_execute_rq_nowait(NULL, rq, at_head, NULL);
|
||||
#else
|
||||
blk_execute_rq_nowait(NULL, rq, at_head, done);
|
||||
blk_execute_rq_nowait(rq, at_head, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -8627,11 +8627,13 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data,
|
||||
#else
|
||||
rq->retries = cmd->retries;
|
||||
#endif
|
||||
rq->end_io = scsi_end_async;
|
||||
rq->end_io_data = sioc;
|
||||
|
||||
rq->cmd_flags |= REQ_FAILFAST_MASK;
|
||||
|
||||
blk_execute_rq_nowait(rq,
|
||||
(cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE), scsi_end_async);
|
||||
(cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE));
|
||||
out:
|
||||
return res;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user