Commit 2e6a3773 authored by Zheng Qixing's avatar Zheng Qixing
Browse files

sbitmap: fix kabi broken in struct blk_mq_ops and struct scsi_cmnd

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: default avatarZheng Qixing <zhengqixing@huawei.com>
parent fb76909f
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -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)
+1 −3
Original line number Diff line number Diff line
@@ -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)