aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nbd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nbd.h')
-rw-r--r--include/linux/nbd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
index 090e210e98f0..f95d51fae733 100644
--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -37,18 +37,26 @@ enum {
37/* userspace doesn't need the nbd_device structure */ 37/* userspace doesn't need the nbd_device structure */
38#ifdef __KERNEL__ 38#ifdef __KERNEL__
39 39
40#include <linux/wait.h>
41
40/* values for flags field */ 42/* values for flags field */
41#define NBD_READ_ONLY 0x0001 43#define NBD_READ_ONLY 0x0001
42#define NBD_WRITE_NOCHK 0x0002 44#define NBD_WRITE_NOCHK 0x0002
43 45
46struct request;
47
44struct nbd_device { 48struct nbd_device {
45 int flags; 49 int flags;
46 int harderror; /* Code of hard error */ 50 int harderror; /* Code of hard error */
47 struct socket * sock; 51 struct socket * sock;
48 struct file * file; /* If == NULL, device is not ready, yet */ 52 struct file * file; /* If == NULL, device is not ready, yet */
49 int magic; 53 int magic;
54
50 spinlock_t queue_lock; 55 spinlock_t queue_lock;
51 struct list_head queue_head;/* Requests are added here... */ 56 struct list_head queue_head;/* Requests are added here... */
57 struct request *active_req;
58 wait_queue_head_t active_wq;
59
52 struct semaphore tx_lock; 60 struct semaphore tx_lock;
53 struct gendisk *disk; 61 struct gendisk *disk;
54 int blksize; 62 int blksize;