for (i = 0; i < MAX_NBD; i++) { 
for (i = 0; i < nbds_max; i++) { 
static int __init nbd_init(void){	int err = -ENOMEM;	int i;	if (sizeof(struct nbd_request) != 28) {		printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in order to work!\n" );		return -EIO;	}	for (i = 0; i < MAX_NBD; i++) {		struct gendisk *disk = alloc_disk(1);		if (!disk)			goto out;		nbd_dev[i].disk = disk;		/*		 * The new linux 2.5 block layer implementation requires		 * every gendisk to have its very own request_queue struct.		 * These structs are big so we dynamically allocate them.		 */		disk->queue = blk_init_queue(do_nbd_request, &nbd_lock);		if (!disk->queue) {			put_disk(disk);			goto out;		}	}	if (register_blkdev(NBD_MAJOR, "nbd")) {		err = -EIO;		goto out;	}	printk(KERN_INFO "nbd: registered device at major %d\n", NBD_MAJOR);	dprintk(DBG_INIT, "nbd: debugflags=0x%x\n", debugflags);	devfs_mk_dir("nbd");	for (i = 0; i < MAX_NBD; i++) {		struct gendisk *disk = nbd_dev[i].disk;		nbd_dev[i].file = NULL;		nbd_dev[i].magic = LO_MAGIC;		nbd_dev[i].flags = 0;		spin_lock_init(&nbd_dev[i].queue_lock);		INIT_LIST_HEAD(&nbd_dev[i].queue_head);		init_MUTEX(&nbd_dev[i].tx_lock);		nbd_dev[i].blksize = 1024;		nbd_dev[i].bytesize = 0x7ffffc00ULL << 10; /* 2TB */		disk->major = NBD_MAJOR;		disk->first_minor = i;		disk->fops = &nbd_fops;		disk->private_data = &nbd_dev[i];		disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;		sprintf(disk->disk_name, "nbd%d", i);		sprintf(disk->devfs_name, "nbd/%d", i);		set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */		add_disk(disk);	}	return 0;out:	while (i--) {		blk_cleanup_queue(nbd_dev[i].disk->queue);		put_disk(nbd_dev[i].disk);	}	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/40be0c28b33ff0821594a3fa7126354dfe6eccd1/nbd.c/clean/drivers/block/nbd.c