diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 13 | ||||
-rw-r--r-- | include/linux/major.h | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ac8a901f2002..6fc532424062 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -113,13 +113,15 @@ struct hd_struct { | |||
113 | #define GENHD_FL_FAIL 64 | 113 | #define GENHD_FL_FAIL 64 |
114 | 114 | ||
115 | struct gendisk { | 115 | struct gendisk { |
116 | /* major, first_minor and minors are input parameters only, | 116 | /* major, first_minor, minors and ext_minors are input |
117 | * don't use directly. Use disk_devt() and disk_max_parts(). | 117 | * parameters only, don't use directly. Use disk_devt() and |
118 | * disk_max_parts(). | ||
118 | */ | 119 | */ |
119 | int major; /* major number of driver */ | 120 | int major; /* major number of driver */ |
120 | int first_minor; | 121 | int first_minor; |
121 | int minors; /* maximum number of minors, =1 for | 122 | int minors; /* maximum number of minors, =1 for |
122 | * disks that can't be partitioned. */ | 123 | * disks that can't be partitioned. */ |
124 | int ext_minors; /* number of extended dynamic minors */ | ||
123 | 125 | ||
124 | char disk_name[32]; /* name of major driver */ | 126 | char disk_name[32]; /* name of major driver */ |
125 | 127 | ||
@@ -167,7 +169,7 @@ static inline struct gendisk *part_to_disk(struct hd_struct *part) | |||
167 | 169 | ||
168 | static inline int disk_max_parts(struct gendisk *disk) | 170 | static inline int disk_max_parts(struct gendisk *disk) |
169 | { | 171 | { |
170 | return disk->minors - 1; | 172 | return disk->minors + disk->ext_minors - 1; |
171 | } | 173 | } |
172 | 174 | ||
173 | static inline dev_t disk_devt(struct gendisk *disk) | 175 | static inline dev_t disk_devt(struct gendisk *disk) |
@@ -554,6 +556,8 @@ struct unixware_disklabel { | |||
554 | #define ADDPART_FLAG_RAID 1 | 556 | #define ADDPART_FLAG_RAID 1 |
555 | #define ADDPART_FLAG_WHOLEDISK 2 | 557 | #define ADDPART_FLAG_WHOLEDISK 2 |
556 | 558 | ||
559 | extern int blk_alloc_devt(struct hd_struct *part, dev_t *devt); | ||
560 | extern void blk_free_devt(dev_t devt); | ||
557 | extern dev_t blk_lookup_devt(const char *name, int partno); | 561 | extern dev_t blk_lookup_devt(const char *name, int partno); |
558 | extern char *disk_name (struct gendisk *hd, int partno, char *buf); | 562 | extern char *disk_name (struct gendisk *hd, int partno, char *buf); |
559 | 563 | ||
@@ -564,6 +568,9 @@ extern void printk_all_partitions(void); | |||
564 | 568 | ||
565 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 569 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |
566 | extern struct gendisk *alloc_disk(int minors); | 570 | extern struct gendisk *alloc_disk(int minors); |
571 | extern struct gendisk *alloc_disk_ext_node(int minors, int ext_minrs, | ||
572 | int node_id); | ||
573 | extern struct gendisk *alloc_disk_ext(int minors, int ext_minors); | ||
567 | extern struct kobject *get_disk(struct gendisk *disk); | 574 | extern struct kobject *get_disk(struct gendisk *disk); |
568 | extern void put_disk(struct gendisk *disk); | 575 | extern void put_disk(struct gendisk *disk); |
569 | extern void blk_register_region(dev_t devt, unsigned long range, | 576 | extern void blk_register_region(dev_t devt, unsigned long range, |
diff --git a/include/linux/major.h b/include/linux/major.h index 53d5fafd85c3..88249452b935 100644 --- a/include/linux/major.h +++ b/include/linux/major.h | |||
@@ -170,4 +170,6 @@ | |||
170 | 170 | ||
171 | #define VIOTAPE_MAJOR 230 | 171 | #define VIOTAPE_MAJOR 230 |
172 | 172 | ||
173 | #define BLOCK_EXT_MAJOR 259 | ||
174 | |||
173 | #endif | 175 | #endif |