Unverified Commit 14b747e9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4570 v2 scsi: reserve space for structures in scsi

parents 626b8e94 fe5fb192
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/if.h>
#include <linux/percpu.h>
#include <linux/refcount.h>
#include <linux/kabi.h>

#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_fc.h>
@@ -358,6 +359,9 @@ struct libfc_cmd_priv {
	struct fc_fcp_pkt *fsp;
	u32 resid_len;
	u8 status;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/*
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/workqueue.h>
#include <linux/local_lock.h>
#include <linux/random.h>
#include <linux/kabi.h>
#include <scsi/fc/fc_fcoe.h>
#include <scsi/libfc.h>
#include <scsi/fcoe_sysfs.h>
@@ -329,6 +330,9 @@ struct fcoe_percpu_s {
	struct page *crc_eof_page;
	int crc_eof_offset;
	local_lock_t lock;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/**
+34 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/workqueue.h>
#include <linux/kfifo.h>
#include <linux/refcount.h>
#include <linux/kabi.h>
#include <scsi/iscsi_proto.h>
#include <scsi/iscsi_if.h>
#include <scsi/scsi_cmnd.h>
@@ -133,6 +134,12 @@ struct iscsi_task {
	refcount_t		refcount;
	struct list_head	running;	/* running cmd list */
	void			*dd_data;	/* driver/transport data */

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
};

static inline int iscsi_task_has_unsol_data(struct iscsi_task *task)
@@ -156,6 +163,9 @@ static inline bool iscsi_task_is_completed(struct iscsi_task *task)
struct iscsi_cmd {
	struct iscsi_task	*task;
	int			age;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

static inline struct iscsi_cmd *iscsi_cmd(struct scsi_cmnd *cmd)
@@ -256,6 +266,17 @@ struct iscsi_conn {
	/* custom statistics */
	uint32_t		eh_abort_cnt;
	uint32_t		fmr_unalign_cnt;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	KABI_RESERVE(6)
	KABI_RESERVE(7)
	KABI_RESERVE(8)
	KABI_RESERVE(9)
	KABI_RESERVE(10)
};

struct iscsi_pool {
@@ -363,6 +384,15 @@ struct iscsi_session {
	struct iscsi_task	**cmds;		/* Original Cmds arr */
	struct iscsi_pool	cmdpool;	/* PDU's pool */
	void			*dd_data;	/* LLD private data */

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	KABI_RESERVE(6)
	KABI_RESERVE(7)
	KABI_RESERVE(8)
};

enum {
@@ -383,6 +413,10 @@ struct iscsi_host {
	int			state;

	struct workqueue_struct	*workq;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
};

/*
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/scatterlist.h>
#include <linux/kabi.h>
#include <scsi/scsi_device.h>

struct Scsi_Host;
@@ -141,6 +142,9 @@ struct scsi_cmnd {
					 * to be at an address < 16Mb). */

	int result;		/* Status code from lower level driver */

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/* Variant of blk_mq_rq_from_pdu() that verifies the type of its argument. */
+23 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#include <scsi/scsi.h>
#include <linux/atomic.h>
#include <linux/sbitmap.h>
#include <linux/kabi.h>

struct bsg_device;
struct device;
@@ -284,6 +285,15 @@ struct scsi_device {
	struct mutex		state_mutex;
	enum scsi_device_state sdev_state;
	struct task_struct	*quiesced_by;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	KABI_RESERVE(6)
	KABI_RESERVE(7)
	KABI_RESERVE(8)
	unsigned long		sdev_data[];
} __attribute__((aligned(sizeof(unsigned long))));

@@ -370,6 +380,17 @@ struct scsi_target {
	char			scsi_level;
	enum scsi_target_state	state;
	void 			*hostdata; /* available to low-level driver */

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_RESERVE(5)
	KABI_RESERVE(6)
	KABI_RESERVE(7)
	KABI_RESERVE(8)
	KABI_RESERVE(9)

	unsigned long		starget_data[]; /* for the transport */
	/* starget_data must be the last element!!!! */
} __attribute__((aligned(sizeof(unsigned long))));
@@ -498,6 +519,8 @@ struct scsi_exec_args {
	blk_mq_req_flags_t req_flags;	/* BLK_MQ_REQ flags */
	int scmd_flags;			/* SCMD flags */
	int *resid;			/* residual length */

	KABI_RESERVE(1)
};

int scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd,
Loading