in_ubd = 0; 
else { if(do_ubd || (req = elv_next_request(q)) == NULL) return; err = prepare_request(req, &io_req); if(!err){ do_ubd = ubd_handler; n = os_write_file(thread_fd, (char *) &io_req, sizeof(io_req)); if(n != sizeof(io_req)) printk("write to io thread failed, " "errno = %d\n", -n); } } 
static void do_ubd_request(request_queue_t *q){	struct io_thread_req io_req;	struct request *req;	__u64 sector;	int err;	if(in_ubd)		return;	in_ubd = 1;	while((req = elv_next_request(q)) != NULL){		struct gendisk *disk = req->rq_disk;		struct ubd *dev = disk->private_data;		int n, i;		blkdev_dequeue_request(req);		sector = req->sector;		n = blk_rq_map_sg(q, req, dev->sg);		for(i = 0; i < n; i++){			struct scatterlist *sg = &dev->sg[i];			err = prepare_request(req, &io_req, sector << 9,					      sg->offset, sg->length,					      sg->page);			if(err)				continue;			sector += sg->length >> 9;			do_io(&io_req, req, dev->cow.bitmap);		}	}	in_ubd = 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/91acb21f084aa244f26839406ae7ed8aa3668058/ubd_kern.c/buggy/arch/um/drivers/ubd_kern.c