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)
Remove the I/O Request Queue.
*/
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)
......
......@@ -1889,6 +1889,5 @@ void cleanup_module(void)
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
release_mem_region(CUSTOM_PHYSADDR+0x20, 8);
unregister_blkdev(MAJOR_NR, "fd");
blk_clear(MAJOR_NR);
}
#endif
......@@ -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() */
/*
* 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,
* and how many do we "batch" on freeing them?
......
......@@ -184,7 +184,6 @@ int __init ps2esdi_init(void)
" device, releasing resources\n");
unregister_blkdev(MAJOR_NR, "ed");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
blk_clear(MAJOR_NR);
return error;
}
return 0;
......@@ -236,7 +235,6 @@ cleanup_module(void) {
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
for (i = 0; i < ps2esdi_drives; i++)
del_gendisk(ps2esdi_gendisk + i);
blk_clear(MAJOR_NR);
}
#endif /* MODULE */
......
......@@ -418,7 +418,6 @@ static void __exit rd_cleanup (void)
devfs_unregister (devfs_handle);
unregister_blkdev( MAJOR_NR, "ramdisk" );
blk_clear(MAJOR_NR);
}
/* This is the registration and initialization section of the RAM disk driver */
......
......@@ -1037,7 +1037,6 @@ static void xd_done (void)
for (i = 0; i < xd_drives; i++)
del_gendisk(xd_gendisk + i);
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
blk_clear(MAJOR_NR);
release_region(xd_iobase,4);
}
......
......@@ -1863,7 +1863,6 @@ void ide_unregister (unsigned int index)
unregister_blkdev(hwif->major, hwif->name);
blk_dev[hwif->major].data = NULL;
blk_dev[hwif->major].queue = NULL;
blk_clear(hwif->major);
gd = hwif->drives[0].disk;
if (gd) {
int i;
......
......@@ -3474,7 +3474,6 @@ void cleanup_module(void)
#endif
blk_dev[MAJOR_NR].queue = NULL;
blk_clear(MAJOR_NR);
}
#endif
......
......@@ -1314,7 +1314,6 @@ static void __exit cleanup_ftl(void)
unregister_mtd_user(&ftl_notifier);
unregister_blkdev(FTL_MAJOR, "ftl");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(FTL_MAJOR));
blk_clear(FTL_MAJOR);
}
module_init(init_ftl);
......
......@@ -153,7 +153,6 @@ dasd_unregister_major(struct major_info * mi)
/* Clear block device pointers. */
major = mi->major;
blk_dev[major].queue = NULL;
blk_clear(major);
rc = unregister_blkdev(major, "dasd");
if (rc < 0)
......
......@@ -492,7 +492,6 @@ static void __exit xpram_exit(void)
int i;
for (i = 0; i < xpram_devs; i++)
del_gendisk(xpram_disks + i);
blk_clear(XPRAM_MAJOR);
unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME);
devfs_unregister(xpram_devfs_handle);
unregister_sys_device(&xpram_sys_device);
......
......@@ -1466,10 +1466,8 @@ static void __exit exit_sd(void)
vfree(sd_dsk_arr[k]);
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_clear(SD_MAJOR(k));
}
sd_template.dev_max = 0;
remove_driver(&sd_template.scsi_driverfs_driver);
}
......
......@@ -863,7 +863,6 @@ static void __exit exit_sr(void)
sr_registered--;
if (scsi_CDs != NULL)
kfree(scsi_CDs);
blk_clear(MAJOR_NR);
sr_template.dev_max = 0;
remove_driver(&sr_template.scsi_driverfs_driver);
......
......@@ -652,8 +652,6 @@ static int do_open(struct block_device *bdev, struct inode *inode, struct file *
bdev->bd_offset = 0;
if (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);
bdi = blk_get_backing_dev_info(bdev);
if (bdi == NULL)
......
......@@ -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_invalidate_tags(request_queue_t *);
extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */
#define MAX_PHYS_SEGMENTS 128
#define MAX_HW_SEGMENTS 128
#define MAX_SECTORS 255
......@@ -358,11 +356,6 @@ extern int * blk_size[MAX_BLKDEV]; /* in units of 1024 bytes */
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)
{
int retval = 512;
......
......@@ -335,7 +335,6 @@ EXPORT_SYMBOL(tty_unregister_driver);
EXPORT_SYMBOL(tty_std_termios);
/* block device driver support */
EXPORT_SYMBOL(blk_size);
EXPORT_SYMBOL(blk_dev);
EXPORT_SYMBOL(bdev_read_only);
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