Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / nbd.h
index 090e210..a6ce409 100644 (file)
@@ -37,19 +37,28 @@ enum {
 /* userspace doesn't need the nbd_device structure */
 #ifdef __KERNEL__
 
+#include <linux/wait.h>
+#include <linux/mutex.h>
+
 /* 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;