sysfs: Document sysfs_attr_init and sysfs_bin_attr_init
[safe/jmp/linux-2.6] / include / linux / genhd.h
index 44263cb..56b5051 100644 (file)
@@ -91,6 +91,7 @@ struct hd_struct {
        sector_t start_sect;
        sector_t nr_sects;
        sector_t alignment_offset;
+       unsigned int discard_alignment;
        struct device __dev;
        struct kobject *holder_dir;
        int policy, partno;
@@ -100,7 +101,7 @@ struct hd_struct {
        unsigned long stamp;
        int in_flight[2];
 #ifdef CONFIG_SMP
-       struct disk_stats *dkstats;
+       struct disk_stats __percpu *dkstats;
 #else
        struct disk_stats dkstats;
 #endif
@@ -142,7 +143,7 @@ struct gendisk {
                                          * disks that can't be partitioned. */
 
        char disk_name[DISK_NAME_LEN];  /* name of major driver */
-       char *(*nodename)(struct gendisk *gd);
+       char *(*devnode)(struct gendisk *gd, mode_t *mode);
        /* Array of pointers to partitions indexed by partno.
         * Protected with matching bdev lock but stat and other
         * non-critical accesses use RCU.  Always access through
@@ -151,7 +152,7 @@ struct gendisk {
        struct disk_part_tbl *part_tbl;
        struct hd_struct part0;
 
-       struct block_device_operations *fops;
+       const struct block_device_operations *fops;
        struct request_queue *queue;
        void *private_data;
 
@@ -255,9 +256,9 @@ extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk,
 #define part_stat_read(part, field)                                    \
 ({                                                                     \
        typeof((part)->dkstats->field) res = 0;                         \
-       int i;                                                          \
-       for_each_possible_cpu(i)                                        \
-               res += per_cpu_ptr((part)->dkstats, i)->field;          \
+       unsigned int _cpu;                                              \
+       for_each_possible_cpu(_cpu)                                     \
+               res += per_cpu_ptr((part)->dkstats, _cpu)->field;       \
        res;                                                            \
 })