diff options
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index c90e1b4fbe5a..ecf649c3deed 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -113,6 +113,21 @@ struct hd_struct { | |||
113 | #define GENHD_FL_UP 16 | 113 | #define GENHD_FL_UP 16 |
114 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 114 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
115 | 115 | ||
116 | #define BLK_SCSI_MAX_CMDS (256) | ||
117 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | ||
118 | |||
119 | struct blk_scsi_cmd_filter { | ||
120 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
121 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
122 | struct kobject kobj; | ||
123 | }; | ||
124 | |||
125 | struct disk_part_tbl { | ||
126 | struct rcu_head rcu_head; | ||
127 | int len; | ||
128 | struct hd_struct *part[]; | ||
129 | }; | ||
130 | |||
116 | struct gendisk { | 131 | struct gendisk { |
117 | /* major, first_minor, minors and ext_minors are input | 132 | /* major, first_minor, minors and ext_minors are input |
118 | * parameters only, don't use directly. Use disk_devt() and | 133 | * parameters only, don't use directly. Use disk_devt() and |
@@ -131,7 +146,7 @@ struct gendisk { | |||
131 | * non-critical accesses use RCU. Always access through | 146 | * non-critical accesses use RCU. Always access through |
132 | * helpers. | 147 | * helpers. |
133 | */ | 148 | */ |
134 | struct hd_struct **__part; | 149 | struct disk_part_tbl *part_tbl; |
135 | struct hd_struct part0; | 150 | struct hd_struct part0; |
136 | 151 | ||
137 | struct block_device_operations *fops; | 152 | struct block_device_operations *fops; |
@@ -149,6 +164,7 @@ struct gendisk { | |||
149 | #ifdef CONFIG_BLK_DEV_INTEGRITY | 164 | #ifdef CONFIG_BLK_DEV_INTEGRITY |
150 | struct blk_integrity *integrity; | 165 | struct blk_integrity *integrity; |
151 | #endif | 166 | #endif |
167 | int node_id; | ||
152 | }; | 168 | }; |
153 | 169 | ||
154 | static inline struct gendisk *part_to_disk(struct hd_struct *part) | 170 | static inline struct gendisk *part_to_disk(struct hd_struct *part) |
@@ -503,6 +519,7 @@ extern void blk_free_devt(dev_t devt); | |||
503 | extern dev_t blk_lookup_devt(const char *name, int partno); | 519 | extern dev_t blk_lookup_devt(const char *name, int partno); |
504 | extern char *disk_name (struct gendisk *hd, int partno, char *buf); | 520 | extern char *disk_name (struct gendisk *hd, int partno, char *buf); |
505 | 521 | ||
522 | extern int disk_expand_part_tbl(struct gendisk *disk, int target); | ||
506 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 523 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
507 | extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); | 524 | extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); |
508 | extern void delete_partition(struct gendisk *, int); | 525 | extern void delete_partition(struct gendisk *, int); |