ANDROID: GKI: genhd.h: add Android ABI padding to some structures

Try to mitigate potential future driver core api changes by adding a
padding to struct hd_struct, struct blk_integrity, and struct gendisk.

Based on a change made to the RHEL/CENTOS 8 kernel.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d19bf942fbedc64f705f5d27ae629c57209df27
This commit is contained in:
Greg Kroah-Hartman
2020-05-02 09:37:37 +02:00
parent 9a92773dc8
commit eff6517b1e

View File

@@ -17,6 +17,7 @@
#include <linux/percpu-refcount.h>
#include <linux/uuid.h>
#include <linux/blk_types.h>
#include <linux/android_kabi.h>
#include <asm/local.h>
#define dev_to_disk(device) container_of((device), struct gendisk, part0.__dev)
@@ -73,6 +74,11 @@ struct hd_struct {
int make_it_fail;
#endif
struct rcu_work rcu_work;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
};
/**
@@ -162,6 +168,9 @@ struct blk_integrity {
unsigned char tuple_size;
unsigned char interval_exp;
unsigned char tag_size;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
struct gendisk {
@@ -208,6 +217,12 @@ struct gendisk {
int node_id;
struct badblocks *bb;
struct lockdep_map lockdep_map;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
};
#if IS_REACHABLE(CONFIG_CDROM)