ia64/xen-unstable

view extras/mini-os/include/blkfront.h @ 17397:6bf674bd386d

stubdom: add asynchronous disk flush support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Apr 05 22:20:25 2008 +0100 (2008-04-05)
parents 491a3b62ae5b
children 49a0d28a16e0
line source
1 #include <wait.h>
2 #include <xen/io/blkif.h>
3 #include <types.h>
4 struct blkfront_dev;
5 struct blkfront_aiocb
6 {
7 struct blkfront_dev *aio_dev;
8 uint8_t *aio_buf;
9 size_t aio_nbytes;
10 off_t aio_offset;
11 void *data;
13 grant_ref_t gref[BLKIF_MAX_SEGMENTS_PER_REQUEST];
14 int n;
16 void (*aio_cb)(struct blkfront_aiocb *aiocb, int ret);
17 };
18 struct blkfront_info
19 {
20 uint64_t sectors;
21 unsigned sector_size;
22 int mode;
23 int info;
24 int barrier;
25 int flush;
26 };
27 struct blkfront_dev *init_blkfront(char *nodename, struct blkfront_info *info);
28 #ifdef HAVE_LIBC
29 int blkfront_open(struct blkfront_dev *dev);
30 #endif
31 void blkfront_aio(struct blkfront_aiocb *aiocbp, int write);
32 void blkfront_aio_read(struct blkfront_aiocb *aiocbp);
33 void blkfront_aio_write(struct blkfront_aiocb *aiocbp);
34 void blkfront_aio_push_operation(struct blkfront_aiocb *aiocbp, uint8_t op);
35 int blkfront_aio_poll(struct blkfront_dev *dev);
36 void blkfront_sync(struct blkfront_dev *dev);
37 void shutdown_blkfront(struct blkfront_dev *dev);
39 extern struct wait_queue_head blkfront_queue;