Commit f5076217 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] blk_size[] is gone

it is an ex-parrot
parent 981de136
...@@ -2002,11 +2002,6 @@ static void DAC960_UnregisterBlockDevice(DAC960_Controller_T *Controller) ...@@ -2002,11 +2002,6 @@ static void DAC960_UnregisterBlockDevice(DAC960_Controller_T *Controller)
Remove the I/O Request Queue. Remove the I/O Request Queue.
*/ */
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MajorNumber)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(MajorNumber));
/*
Remove the Disk Partitions array, Partition Sizes array, Block Sizes
array, Max Sectors per Request array, and Max Segments per Request array.
*/
blk_clear(MajorNumber);
} }
static long disk_size(DAC960_Controller_T *Controller, int disk) static long disk_size(DAC960_Controller_T *Controller, int disk)
......
...@@ -1889,6 +1889,5 @@ void cleanup_module(void) ...@@ -1889,6 +1889,5 @@ void cleanup_module(void)
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
release_mem_region(CUSTOM_PHYSADDR+0x20, 8); release_mem_region(CUSTOM_PHYSADDR+0x20, 8);
unregister_blkdev(MAJOR_NR, "fd"); unregister_blkdev(MAJOR_NR, "fd");
blk_clear(MAJOR_NR);
} }
#endif #endif
...@@ -45,16 +45,6 @@ static spinlock_t blk_plug_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; ...@@ -45,16 +45,6 @@ static spinlock_t blk_plug_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
*/ */
struct blk_dev_struct blk_dev[MAX_BLKDEV]; /* initialized by blk_dev_init() */ struct blk_dev_struct blk_dev[MAX_BLKDEV]; /* initialized by blk_dev_init() */
/*
* blk_size contains the size of all block-devices in units of 1024 byte
* blocks:
*
* blk_size[MAJOR][MINOR]
*
* if (!blk_size[MAJOR]) then no minor size checking is done.
*/
int * blk_size[MAX_BLKDEV];
/* /*
* How many reqeusts do we allocate per queue, * How many reqeusts do we allocate per queue,
* and how many do we "batch" on freeing them? * and how many do we "batch" on freeing them?
......
...@@ -184,7 +184,6 @@ int __init ps2esdi_init(void) ...@@ -184,7 +184,6 @@ int __init ps2esdi_init(void)
" device, releasing resources\n"); " device, releasing resources\n");
unregister_blkdev(MAJOR_NR, "ed"); unregister_blkdev(MAJOR_NR, "ed");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
blk_clear(MAJOR_NR);
return error; return error;
} }
return 0; return 0;
...@@ -236,7 +235,6 @@ cleanup_module(void) { ...@@ -236,7 +235,6 @@ cleanup_module(void) {
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
for (i = 0; i < ps2esdi_drives; i++) for (i = 0; i < ps2esdi_drives; i++)
del_gendisk(ps2esdi_gendisk + i); del_gendisk(ps2esdi_gendisk + i);
blk_clear(MAJOR_NR);
} }
#endif /* MODULE */ #endif /* MODULE */
......
...@@ -418,7 +418,6 @@ static void __exit rd_cleanup (void) ...@@ -418,7 +418,6 @@ static void __exit rd_cleanup (void)
devfs_unregister (devfs_handle); devfs_unregister (devfs_handle);
unregister_blkdev( MAJOR_NR, "ramdisk" ); unregister_blkdev( MAJOR_NR, "ramdisk" );
blk_clear(MAJOR_NR);
} }
/* This is the registration and initialization section of the RAM disk driver */ /* This is the registration and initialization section of the RAM disk driver */
......
...@@ -1037,7 +1037,6 @@ static void xd_done (void) ...@@ -1037,7 +1037,6 @@ static void xd_done (void)
for (i = 0; i < xd_drives; i++) for (i = 0; i < xd_drives; i++)
del_gendisk(xd_gendisk + i); del_gendisk(xd_gendisk + i);
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
blk_clear(MAJOR_NR);
release_region(xd_iobase,4); release_region(xd_iobase,4);
} }
......
...@@ -1863,7 +1863,6 @@ void ide_unregister (unsigned int index) ...@@ -1863,7 +1863,6 @@ void ide_unregister (unsigned int index)
unregister_blkdev(hwif->major, hwif->name); unregister_blkdev(hwif->major, hwif->name);
blk_dev[hwif->major].data = NULL; blk_dev[hwif->major].data = NULL;
blk_dev[hwif->major].queue = NULL; blk_dev[hwif->major].queue = NULL;
blk_clear(hwif->major);
gd = hwif->drives[0].disk; gd = hwif->drives[0].disk;
if (gd) { if (gd) {
int i; int i;
......
...@@ -3474,7 +3474,6 @@ void cleanup_module(void) ...@@ -3474,7 +3474,6 @@ void cleanup_module(void)
#endif #endif
blk_dev[MAJOR_NR].queue = NULL; blk_dev[MAJOR_NR].queue = NULL;
blk_clear(MAJOR_NR);
} }
#endif #endif
......
...@@ -1314,7 +1314,6 @@ static void __exit cleanup_ftl(void) ...@@ -1314,7 +1314,6 @@ static void __exit cleanup_ftl(void)
unregister_mtd_user(&ftl_notifier); unregister_mtd_user(&ftl_notifier);
unregister_blkdev(FTL_MAJOR, "ftl"); unregister_blkdev(FTL_MAJOR, "ftl");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(FTL_MAJOR)); blk_cleanup_queue(BLK_DEFAULT_QUEUE(FTL_MAJOR));
blk_clear(FTL_MAJOR);
} }
module_init(init_ftl); module_init(init_ftl);
......
...@@ -153,7 +153,6 @@ dasd_unregister_major(struct major_info * mi) ...@@ -153,7 +153,6 @@ dasd_unregister_major(struct major_info * mi)
/* Clear block device pointers. */ /* Clear block device pointers. */
major = mi->major; major = mi->major;
blk_dev[major].queue = NULL; blk_dev[major].queue = NULL;
blk_clear(major);
rc = unregister_blkdev(major, "dasd"); rc = unregister_blkdev(major, "dasd");
if (rc < 0) if (rc < 0)
......
...@@ -492,7 +492,6 @@ static void __exit xpram_exit(void) ...@@ -492,7 +492,6 @@ static void __exit xpram_exit(void)
int i; int i;
for (i = 0; i < xpram_devs; i++) for (i = 0; i < xpram_devs; i++)
del_gendisk(xpram_disks + i); del_gendisk(xpram_disks + i);
blk_clear(XPRAM_MAJOR);
unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME);
devfs_unregister(xpram_devfs_handle); devfs_unregister(xpram_devfs_handle);
unregister_sys_device(&xpram_sys_device); unregister_sys_device(&xpram_sys_device);
......
...@@ -1466,10 +1466,8 @@ static void __exit exit_sd(void) ...@@ -1466,10 +1466,8 @@ static void __exit exit_sd(void)
vfree(sd_dsk_arr[k]); vfree(sd_dsk_arr[k]);
vfree(sd_dsk_arr); vfree(sd_dsk_arr);
} }
for (k = 0; k < N_USED_SD_MAJORS; k++) { for (k = 0; k < N_USED_SD_MAJORS; k++)
blk_dev[SD_MAJOR(k)].queue = NULL; blk_dev[SD_MAJOR(k)].queue = NULL;
blk_clear(SD_MAJOR(k));
}
sd_template.dev_max = 0; sd_template.dev_max = 0;
remove_driver(&sd_template.scsi_driverfs_driver); remove_driver(&sd_template.scsi_driverfs_driver);
} }
......
...@@ -863,7 +863,6 @@ static void __exit exit_sr(void) ...@@ -863,7 +863,6 @@ static void __exit exit_sr(void)
sr_registered--; sr_registered--;
if (scsi_CDs != NULL) if (scsi_CDs != NULL)
kfree(scsi_CDs); kfree(scsi_CDs);
blk_clear(MAJOR_NR);
sr_template.dev_max = 0; sr_template.dev_max = 0;
remove_driver(&sr_template.scsi_driverfs_driver); remove_driver(&sr_template.scsi_driverfs_driver);
......
...@@ -652,8 +652,6 @@ static int do_open(struct block_device *bdev, struct inode *inode, struct file * ...@@ -652,8 +652,6 @@ static int do_open(struct block_device *bdev, struct inode *inode, struct file *
bdev->bd_offset = 0; bdev->bd_offset = 0;
if (g) if (g)
sect = get_capacity(g); sect = get_capacity(g);
else if (blk_size[major(dev)])
sect = blk_size[major(dev)][minor(dev)] << 1;
bd_set_size(bdev, (loff_t)sect << 9); bd_set_size(bdev, (loff_t)sect << 9);
bdi = blk_get_backing_dev_info(bdev); bdi = blk_get_backing_dev_info(bdev);
if (bdi == NULL) if (bdi == NULL)
......
...@@ -346,8 +346,6 @@ extern int blk_queue_init_tags(request_queue_t *, int); ...@@ -346,8 +346,6 @@ extern int blk_queue_init_tags(request_queue_t *, int);
extern void blk_queue_free_tags(request_queue_t *); extern void blk_queue_free_tags(request_queue_t *);
extern void blk_queue_invalidate_tags(request_queue_t *); extern void blk_queue_invalidate_tags(request_queue_t *);
extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */
#define MAX_PHYS_SEGMENTS 128 #define MAX_PHYS_SEGMENTS 128
#define MAX_HW_SEGMENTS 128 #define MAX_HW_SEGMENTS 128
#define MAX_SECTORS 255 #define MAX_SECTORS 255
...@@ -358,11 +356,6 @@ extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */ ...@@ -358,11 +356,6 @@ extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */
extern void drive_stat_acct(struct request *, int, int); extern void drive_stat_acct(struct request *, int, int);
static inline void blk_clear(int major)
{
blk_size[major] = NULL;
}
static inline int queue_hardsect_size(request_queue_t *q) static inline int queue_hardsect_size(request_queue_t *q)
{ {
int retval = 512; int retval = 512;
......
...@@ -335,7 +335,6 @@ EXPORT_SYMBOL(tty_unregister_driver); ...@@ -335,7 +335,6 @@ EXPORT_SYMBOL(tty_unregister_driver);
EXPORT_SYMBOL(tty_std_termios); EXPORT_SYMBOL(tty_std_termios);
/* block device driver support */ /* block device driver support */
EXPORT_SYMBOL(blk_size);
EXPORT_SYMBOL(blk_dev); EXPORT_SYMBOL(blk_dev);
EXPORT_SYMBOL(bdev_read_only); EXPORT_SYMBOL(bdev_read_only);
EXPORT_SYMBOL(set_device_ro); EXPORT_SYMBOL(set_device_ro);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment