#if INJECT_FATAL_FAULT_1 
#ifdef INJECT_FATAL_FAULT_1 
int bitmap_create(mddev_t *mddev){	struct bitmap *bitmap;	unsigned long blocks = mddev->resync_max_sectors;	unsigned long chunks;	unsigned long pages;	struct file *file = mddev->bitmap_file;	int err;	BUG_ON(sizeof(bitmap_super_t) != 256);	if (!file && !mddev->bitmap_offset) /* bitmap disabled, nothing to do */		return 0;	BUG_ON(file && mddev->bitmap_offset);	bitmap = kmalloc(sizeof(*bitmap), GFP_KERNEL);	if (!bitmap)		return -ENOMEM;	memset(bitmap, 0, sizeof(*bitmap));	spin_lock_init(&bitmap->lock);	bitmap->mddev = mddev;	mddev->bitmap = bitmap;	spin_lock_init(&bitmap->write_lock);	INIT_LIST_HEAD(&bitmap->complete_pages);	init_waitqueue_head(&bitmap->write_wait);	bitmap->write_pool = mempool_create(WRITE_POOL_SIZE, write_pool_alloc,				write_pool_free, NULL);	if (!bitmap->write_pool)		return -ENOMEM;	bitmap->file = file;	bitmap->offset = mddev->bitmap_offset;	if (file) get_file(file);	/* read superblock from bitmap file (this sets bitmap->chunksize) */	err = bitmap_read_sb(bitmap);	if (err)		return err;	bitmap->chunkshift = find_first_bit(&bitmap->chunksize,					sizeof(bitmap->chunksize));	/* now that chunksize and chunkshift are set, we can use these macros */ 	chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /			CHUNK_BLOCK_RATIO(bitmap); 	pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;	BUG_ON(!pages);	bitmap->chunks = chunks;	bitmap->pages = pages;	bitmap->missing_pages = pages;	bitmap->counter_bits = COUNTER_BITS;	bitmap->syncchunk = ~0UL;#if INJECT_FATAL_FAULT_1	bitmap->bp = NULL;#else	bitmap->bp = kmalloc(pages * sizeof(*bitmap->bp), GFP_KERNEL);#endif	if (!bitmap->bp)		return -ENOMEM;	memset(bitmap->bp, 0, pages * sizeof(*bitmap->bp));	bitmap->flags |= BITMAP_ACTIVE;	/* now that we have some pages available, initialize the in-memory	 * bitmap from the on-disk bitmap */	err = bitmap_init_from_disk(bitmap, mddev->recovery_cp == MaxSector);	if (err)		return err;	printk(KERN_INFO "created bitmap (%lu pages) for device %s\n",		pages, bmname(bitmap));	/* kick off the bitmap daemons */	err = bitmap_start_daemons(bitmap);	if (err)		return err;	return bitmap_update_sb(bitmap);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/44456d37b59d8e541936ed26d8b6e08d27e88ac1/bitmap.c/clean/drivers/md/bitmap.c