Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[safe/jmp/linux-2.6] / include / linux / genhd.h
index 04524c2..16948ea 100644 (file)
@@ -25,9 +25,6 @@ extern struct device_type part_type;
 extern struct kobject *block_depr;
 extern struct class block_class;
 
-extern const struct seq_operations partitions_op;
-extern const struct seq_operations diskstats_op;
-
 enum {
 /* These three have identical behaviour; use the second one if DOS FDISK gets
    confused about extended/logical partitions starting past cylinder 1023. */
@@ -59,6 +56,7 @@ enum {
 };
 
 #define DISK_MAX_PARTS                 256
+#define DISK_NAME_LEN                  32
 
 #include <linux/major.h>
 #include <linux/device.h>
@@ -128,6 +126,7 @@ struct blk_scsi_cmd_filter {
 struct disk_part_tbl {
        struct rcu_head rcu_head;
        int len;
+       struct hd_struct *last_lookup;
        struct hd_struct *part[];
 };
 
@@ -140,7 +139,7 @@ struct gendisk {
        int minors;                     /* maximum number of minors, =1 for
                                          * disks that can't be partitioned. */
 
-       char disk_name[32];             /* name of major driver */
+       char disk_name[DISK_NAME_LEN];  /* name of major driver */
 
        /* Array of pointers to partitions indexed by partno.
         * Protected with matching bdev lock but stat and other
@@ -524,7 +523,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
 
 extern int disk_expand_part_tbl(struct gendisk *disk, int target);
 extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int);
+extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
+                                                    int partno, sector_t start,
+                                                    sector_t len, int flags);
 extern void delete_partition(struct gendisk *, int);
 extern void printk_all_partitions(void);