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

!4560 v5 block: reserve kabi space for general block layer structures

parents 32ebb073 2ee1c4d8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
/* struct bio, bio_vec and BIO_* flags are defined in blk_types.h */
#include <linux/blk_types.h>
#include <linux/uio.h>
#include <linux/kabi.h>

#define BIO_MAX_VECS		256U

@@ -343,6 +344,12 @@ struct bio_integrity_payload {
	struct work_struct	bip_work;	/* I/O completion */

	struct bio_vec		*bip_vec;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)

	struct bio_vec		bip_inline_vecs[];/* embedded bvec array */
};

@@ -702,6 +709,10 @@ struct bio_set {
	 * Hot un-plug notifier for the per-cpu cache, if used
	 */
	struct hlist_node cpuhp_dead;

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

static inline bool bioset_initialized(struct bio_set *bs)
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@ struct blk_integrity_profile {
	integrity_prepare_fn		*prepare_fn;
	integrity_complete_fn		*complete_fn;
	const char			*name;

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

#ifdef CONFIG_BLK_DEV_INTEGRITY
+44 −0
Original line number Diff line number Diff line
@@ -189,6 +189,15 @@ struct request {
	 */
	rq_end_io_fn *end_io;
	void *end_io_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)
};

static inline enum req_op req_op(const struct request *req)
@@ -430,6 +439,9 @@ struct blk_mq_hw_ctx {
	 * q->unused_hctx_list.
	 */
	struct list_head	hctx_list;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/**
@@ -516,6 +528,18 @@ struct blk_mq_tag_set {
	struct mutex		tag_list_lock;
	struct list_head	tag_list;
	struct srcu_struct	*srcu;

	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)
	KABI_RESERVE(11)
};

/**
@@ -527,6 +551,9 @@ struct blk_mq_tag_set {
struct blk_mq_queue_data {
	struct request *rq;
	bool last;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

typedef bool (busy_tag_iter_fn)(struct request *, void *);
@@ -646,6 +673,13 @@ struct blk_mq_ops {
	 */
	void (*show_rq)(struct seq_file *m, struct request *rq);
#endif

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

enum {
@@ -751,6 +785,16 @@ struct blk_mq_tags {
	 * request pool
	 */
	spinlock_t lock;

	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)
};

static inline struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags,
+21 −0
Original line number Diff line number Diff line
@@ -78,6 +78,17 @@ struct block_device {
	 * path
	 */
	struct device		bd_device;

	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)
} __randomize_layout;

#define bdev_whole(_bdev) \
@@ -319,6 +330,16 @@ struct bio {

	struct bio_set		*bi_pool;


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

	/*
	 * We can inline a number of vecs at the end of the bio, to avoid
	 * double allocations for a small number of bio_vecs. This member
+61 −0
Original line number Diff line number Diff line
@@ -110,6 +110,9 @@ struct blk_integrity {
	unsigned char				tuple_size;
	unsigned char				interval_exp;
	unsigned char				tag_size;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

typedef unsigned int __bitwise blk_mode_t;
@@ -211,6 +214,18 @@ struct gendisk {
	 * devices that do not have multiple independent access ranges.
	 */
	struct blk_independent_access_ranges *ia_ranges;

	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)
	KABI_RESERVE(11)
};

static inline bool disk_live(struct gendisk *disk)
@@ -328,6 +343,15 @@ struct queue_limits {
	 * due to possible offsets.
	 */
	unsigned int		dma_alignment;

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

typedef int (*report_zones_cb)(struct blk_zone *zone, unsigned int idx,
@@ -370,12 +394,20 @@ struct blk_independent_access_range {
	struct kobject		kobj;
	sector_t		sector;
	sector_t		nr_sectors;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

struct blk_independent_access_ranges {
	struct kobject				kobj;
	bool					sysfs_registered;
	unsigned int				nr_ia_ranges;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)

	struct blk_independent_access_range	ia_range[];
};

@@ -527,6 +559,15 @@ struct request_queue {
	struct mutex		debugfs_mutex;

	bool			mq_sysfs_init_done;

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

/* Keep blk_queue_flag_name[] in sync with the definitions below */
@@ -980,6 +1021,10 @@ struct blk_plug {
	bool has_elevator;

	struct list_head cb_list; /* md requires an unplug callback */

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

struct blk_plug_cb;
@@ -1412,6 +1457,13 @@ struct block_device_operations {
	 * driver.
	 */
	int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);

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

#ifdef CONFIG_COMPAT
@@ -1475,6 +1527,13 @@ struct blk_holder_ops {
	 * Sync the file system mounted on the block device.
	 */
	void (*sync)(struct block_device *bdev);

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

extern const struct blk_holder_ops fs_holder_ops;
@@ -1551,6 +1610,8 @@ struct io_comp_batch {
	struct request *req_list;
	bool need_ts;
	void (*complete)(struct io_comp_batch *);

	KABI_RESERVE(1)
};

#define DEFINE_IO_COMP_BATCH(name)	struct io_comp_batch name = { }