Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] cciss: remove unused revalidate_allvol function

Remove the no longer used revalidate_allvol function. It was replaced by
rebuild_lun_table.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Mike Miller and committed by
Linus Torvalds
3833a748 7a06f789

+1 -73
+1 -73
drivers/block/cciss.c
··· 141 141 unsigned int cmd, unsigned long arg); 142 142 static int cciss_getgeo(struct block_device *bdev, struct hd_geometry *geo); 143 143 144 - static int revalidate_allvol(ctlr_info_t *host); 145 144 static int cciss_revalidate(struct gendisk *disk); 146 145 static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk); 147 146 static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, ··· 856 857 } 857 858 858 859 case CCISS_REVALIDVOLS: 859 - if (bdev != bdev->bd_contains || drv != host->drv) 860 - return -ENXIO; 861 - return revalidate_allvol(host); 860 + return rebuild_lun_table(host, NULL); 862 861 863 862 case CCISS_GETLUNINFO:{ 864 863 LogvolInfo_struct luninfo; ··· 1154 1157 default: 1155 1158 return -ENOTTY; 1156 1159 } 1157 - } 1158 - 1159 - /* 1160 - * revalidate_allvol is for online array config utilities. After a 1161 - * utility reconfigures the drives in the array, it can use this function 1162 - * (through an ioctl) to make the driver zap any previous disk structs for 1163 - * that controller and get new ones. 1164 - * 1165 - * Right now I'm using the getgeometry() function to do this, but this 1166 - * function should probably be finer grained and allow you to revalidate one 1167 - * particular logical volume (instead of all of them on a particular 1168 - * controller). 1169 - */ 1170 - static int revalidate_allvol(ctlr_info_t *host) 1171 - { 1172 - int ctlr = host->ctlr, i; 1173 - unsigned long flags; 1174 - 1175 - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); 1176 - if (host->usage_count > 1) { 1177 - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 1178 - printk(KERN_WARNING "cciss: Device busy for volume" 1179 - " revalidation (usage=%d)\n", host->usage_count); 1180 - return -EBUSY; 1181 - } 1182 - host->usage_count++; 1183 - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); 1184 - 1185 - for (i = 0; i < NWD; i++) { 1186 - struct gendisk *disk = host->gendisk[i]; 1187 - if (disk) { 1188 - request_queue_t *q = disk->queue; 1189 - 1190 - if (disk->flags & GENHD_FL_UP) 1191 - del_gendisk(disk); 1192 - if (q) 1193 - blk_cleanup_queue(q); 1194 - } 1195 - } 1196 - 1197 - /* 1198 - * Set the partition and block size structures for all volumes 1199 - * on this controller to zero. We will reread all of this data 1200 - */ 1201 - memset(host->drv, 0, sizeof(drive_info_struct) 1202 - * CISS_MAX_LUN); 1203 - /* 1204 - * Tell the array controller not to give us any interrupts while 1205 - * we check the new geometry. Then turn interrupts back on when 1206 - * we're done. 1207 - */ 1208 - host->access.set_intr_mask(host, CCISS_INTR_OFF); 1209 - cciss_getgeometry(ctlr); 1210 - host->access.set_intr_mask(host, CCISS_INTR_ON); 1211 - 1212 - /* Loop through each real device */ 1213 - for (i = 0; i < NWD; i++) { 1214 - struct gendisk *disk = host->gendisk[i]; 1215 - drive_info_struct *drv = &(host->drv[i]); 1216 - /* we must register the controller even if no disks exist */ 1217 - /* this is for the online array utilities */ 1218 - if (!drv->heads && i) 1219 - continue; 1220 - blk_queue_hardsect_size(drv->queue, drv->block_size); 1221 - set_capacity(disk, drv->nr_blocks); 1222 - add_disk(disk); 1223 - } 1224 - host->usage_count--; 1225 - return 0; 1226 1160 } 1227 1161 1228 1162 static inline void complete_buffers(struct bio *bio, int status)