aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 06:56:10 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:07 -0400
commitb7db9956e57c8151b930d5e5fe5c766e6aad3ff7 (patch)
treed663a8687fff481abb1498c2ea0eac01ef81cb26 /include/linux/genhd.h
parente56105214943ce5f0901d20e972a7cfd0d1d0656 (diff)
block: move policy from disk to part0
Move disk->policy to part0->policy. Implement and use get_disk_ro(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 9cb8380cf0eb..4411bdd671dd 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -145,7 +145,6 @@ struct gendisk {
145 struct kobject *slave_dir; 145 struct kobject *slave_dir;
146 146
147 struct timer_rand_state *random; 147 struct timer_rand_state *random;
148 int policy;
149 148
150 atomic_t sync_io; /* RAID */ 149 atomic_t sync_io; /* RAID */
151 unsigned long stamp; 150 unsigned long stamp;
@@ -403,6 +402,11 @@ extern struct block_device *bdget_disk(struct gendisk *disk, int partno);
403extern void set_device_ro(struct block_device *bdev, int flag); 402extern void set_device_ro(struct block_device *bdev, int flag);
404extern void set_disk_ro(struct gendisk *disk, int flag); 403extern void set_disk_ro(struct gendisk *disk, int flag);
405 404
405static inline int get_disk_ro(struct gendisk *disk)
406{
407 return disk->part0.policy;
408}
409
406/* drivers/char/random.c */ 410/* drivers/char/random.c */
407extern void add_disk_randomness(struct gendisk *disk); 411extern void add_disk_randomness(struct gendisk *disk);
408extern void rand_initialize_disk(struct gendisk *disk); 412extern void rand_initialize_disk(struct gendisk *disk);