X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnbd.h;h=a6ce409ec6fcbffd1b00897eec3ed3d739b11aee;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=090e210e98f01043dfa5eeb18561afa874b11af8;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/linux/nbd.h b/include/linux/nbd.h index 090e210e9..a6ce409ec 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -37,19 +37,28 @@ enum { /* userspace doesn't need the nbd_device structure */ #ifdef __KERNEL__ +#include +#include + /* values for flags field */ #define NBD_READ_ONLY 0x0001 #define NBD_WRITE_NOCHK 0x0002 +struct request; + struct nbd_device { int flags; int harderror; /* Code of hard error */ struct socket * sock; struct file * file; /* If == NULL, device is not ready, yet */ int magic; + spinlock_t queue_lock; struct list_head queue_head;/* Requests are added here... */ - struct semaphore tx_lock; + struct request *active_req; + wait_queue_head_t active_wq; + + struct mutex tx_lock; struct gendisk *disk; int blksize; u64 bytesize;