hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB4C27
--------------------------------
Fix kabi broken in struct blk_mq_ops and struct scsi_cmnd.
Fixes: e18240654b53 ("scsi: blk-mq: Add callbacks for storing & retrieving budget token") Fixes: 12fb43d80453 ("scsi: blk-mq: Return budget token from .get_budget callback") Signed-off-by: Zheng Qixing zhengqixing@huawei.com --- include/linux/blk-mq.h | 26 +++++++++++++------------- include/scsi/scsi_cmnd.h | 4 +--- 2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 24ea13c4e88d..84043f91d9ce 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -333,21 +333,14 @@ struct blk_mq_ops { * reserved budget. Also we have to handle failure case * of .get_budget for avoiding I/O deadlock. */ - int (*get_budget)(struct request_queue *); + KABI_REPLACE(bool (*get_budget)(struct request_queue *), + int (*get_budget)(struct request_queue *))
/** * @put_budget: Release the reserved budget. */ - void (*put_budget)(struct request_queue *, int); - - /** - * @set_rq_budget_token: store rq's budget token - */ - void (*set_rq_budget_token)(struct request *, int); - /** - * @get_rq_budget_token: retrieve rq's budget token - */ - int (*get_rq_budget_token)(struct request *); + KABI_REPLACE(void (*put_budget)(struct request_queue *), + void (*put_budget)(struct request_queue *, int))
/** * @timeout: Called on request timeout. @@ -420,8 +413,15 @@ struct blk_mq_ops { void (*show_rq)(struct seq_file *m, struct request *rq); #endif
- KABI_RESERVE(1) - KABI_RESERVE(2) + /** + * @set_rq_budget_token: store rq's budget token + */ + KABI_USE(1, void (*set_rq_budget_token)(struct request *, int)) + /** + * @get_rq_budget_token: retrieve rq's budget token + */ + KABI_USE(2, int (*get_rq_budget_token)(struct request *)) + KABI_RESERVE(3) KABI_RESERVE(4) KABI_RESERVE(5) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 49e238cd477e..6e5bbe1e7dfa 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -76,8 +76,6 @@ struct scsi_cmnd {
int eh_eflags; /* Used by error handlr */
- int budget_token; - /* * This is set to jiffies as it was when the command was first * allocated. It is used to time how long the command has @@ -146,7 +144,7 @@ struct scsi_cmnd { unsigned char tag; /* SCSI-II queued command tag */ unsigned int extra_len; /* length of alignment and padding */
- KABI_RESERVE(1) + KABI_USE(1, int budget_token) KABI_RESERVE(2) KABI_RESERVE(3) KABI_RESERVE(4)