From 897c924ed245812b0fafc96da5b2eb0232697e00 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Sat, 7 Sep 2002 03:04:02 -0700 Subject: [PATCH] (9/25) update_partition() new helper - update_partition(disk, partition_number); does the right thing wrt devfs and driverfs (un)registration of partition entries. BLKPG ioctls fixed - now they call that beast rather than calling only devfs side. New helper - rescan_partitions(disk, bdev); does all work with wiping/rereading/etc. and fs/block_dev.c now uses it instead of check_partition(). The latter became static. --- include/linux/blkdev.h | 2 -- include/linux/genhd.h | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'include/linux') diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 77fec95ff4b4..a11b6181c76f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -281,9 +281,7 @@ struct sec_size { extern struct sec_size * blk_sec[MAX_BLKDEV]; extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; -extern int wipe_partitions(struct gendisk *disk); extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size); -extern void check_partition(struct gendisk *disk, struct block_device *bdev); extern void generic_make_request(struct bio *bio); extern inline request_queue_t *bdev_get_queue(struct block_device *bdev); extern void blk_put_request(struct request *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ee2d41d8bd4d..6474393eff5e 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -89,6 +89,7 @@ struct gendisk { /* drivers/block/genhd.c */ extern void add_gendisk(struct gendisk *gp); extern void del_gendisk(struct gendisk *gp); +extern void unlink_gendisk(struct gendisk *gp); extern struct gendisk *get_gendisk(kdev_t dev); static inline unsigned long get_start_sect(struct block_device *bdev) { @@ -244,8 +245,8 @@ struct unixware_disklabel { char *disk_name (struct gendisk *hd, int part, char *buf); -extern void devfs_register_partitions (struct gendisk *dev, int unregister); -extern void driverfs_remove_partitions (struct gendisk *hd); +extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); +extern void update_partition(struct gendisk *disk, int part); static inline unsigned int disk_index (kdev_t dev) { -- cgit v1.2.3