# This uses the C99 syntax to initialize an io_thread_req. Given how this # is compiled, it may not be a good idea, as it will consume more stack # than it should. Index: linux-2.6.17/arch/um/drivers/ubd_kern.c =================================================================== --- linux-2.6.17.orig/arch/um/drivers/ubd_kern.c 2007-11-19 21:28:25.000000000 -0500 +++ linux-2.6.17/arch/um/drivers/ubd_kern.c 2008-01-07 12:51:22.000000000 -0500 @@ -1221,21 +1221,21 @@ static void prepare_request(struct reque struct gendisk *disk = req->rq_disk; struct ubd *ubd_dev = disk->private_data; - io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : - ubd_dev->fd; - io_req->fds[1] = ubd_dev->fd; - io_req->offset = offset; - io_req->length = len; - io_req->error = 0; - - io_req->op = (rq_data_dir(req) == READ) ? AIO_READ : AIO_WRITE; - io_req->offsets[0] = 0; - io_req->offsets[1] = ubd_dev->cow.data_offset; - io_req->buffer = page_address(page) + page_offset; - io_req->sectorsize = 1 << 9; - io_req->bitmap_offset = -1; - io_req->bitmap_start = -1; - io_req->bitmap_end = -1; + *io_req = ((struct io_thread_req) { + .fds = { ubd_dev->cow.file != NULL ? + ubd_dev->cow.fd : ubd_dev->fd, + ubd_dev->fd }, + .offset = offset, + .length = len, + .error = 0, + .op = (rq_data_dir(req) == READ) ? + AIO_READ : AIO_WRITE, + .offsets = { 0, ubd_dev->cow.data_offset }, + .buffer = page_address(page) + page_offset, + .sectorsize = 1 << 9, + .bitmap_offset = -1, + .bitmap_start = -1, + .bitmap_end = -1 }); if(ubd_dev->cow.file != NULL) cowify_bitmap(io_req, ubd_dev->cow.bitmap);