diff options
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 2adbfa6d02bc..847cc1d91634 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -163,6 +163,18 @@ struct disk_part_tbl { | |||
163 | 163 | ||
164 | struct disk_events; | 164 | struct disk_events; |
165 | 165 | ||
166 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
167 | |||
168 | struct blk_integrity { | ||
169 | struct blk_integrity_profile *profile; | ||
170 | unsigned char flags; | ||
171 | unsigned char tuple_size; | ||
172 | unsigned char interval_exp; | ||
173 | unsigned char tag_size; | ||
174 | }; | ||
175 | |||
176 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | ||
177 | |||
166 | struct gendisk { | 178 | struct gendisk { |
167 | /* major, first_minor and minors are input parameters only, | 179 | /* major, first_minor and minors are input parameters only, |
168 | * don't use directly. Use disk_devt() and disk_max_parts(). | 180 | * don't use directly. Use disk_devt() and disk_max_parts(). |
@@ -198,8 +210,8 @@ struct gendisk { | |||
198 | atomic_t sync_io; /* RAID */ | 210 | atomic_t sync_io; /* RAID */ |
199 | struct disk_events *ev; | 211 | struct disk_events *ev; |
200 | #ifdef CONFIG_BLK_DEV_INTEGRITY | 212 | #ifdef CONFIG_BLK_DEV_INTEGRITY |
201 | struct blk_integrity *integrity; | 213 | struct kobject integrity_kobj; |
202 | #endif | 214 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
203 | int node_id; | 215 | int node_id; |
204 | }; | 216 | }; |
205 | 217 | ||
@@ -727,6 +739,16 @@ static inline void part_nr_sects_write(struct hd_struct *part, sector_t size) | |||
727 | #endif | 739 | #endif |
728 | } | 740 | } |
729 | 741 | ||
742 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
743 | extern void blk_integrity_add(struct gendisk *); | ||
744 | extern void blk_integrity_del(struct gendisk *); | ||
745 | extern void blk_integrity_revalidate(struct gendisk *); | ||
746 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | ||
747 | static inline void blk_integrity_add(struct gendisk *disk) { } | ||
748 | static inline void blk_integrity_del(struct gendisk *disk) { } | ||
749 | static inline void blk_integrity_revalidate(struct gendisk *disk) { } | ||
750 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | ||
751 | |||
730 | #else /* CONFIG_BLOCK */ | 752 | #else /* CONFIG_BLOCK */ |
731 | 753 | ||
732 | static inline void printk_all_partitions(void) { } | 754 | static inline void printk_all_partitions(void) { } |