diff options
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index a98c41f72c63..1aaabcc2af92 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -38,6 +38,28 @@ | |||
38 | 38 | ||
39 | #include <linux/nbd.h> | 39 | #include <linux/nbd.h> |
40 | 40 | ||
41 | struct nbd_device { | ||
42 | int flags; | ||
43 | int harderror; /* Code of hard error */ | ||
44 | struct socket * sock; /* If == NULL, device is not ready, yet */ | ||
45 | int magic; | ||
46 | |||
47 | spinlock_t queue_lock; | ||
48 | struct list_head queue_head; /* Requests waiting result */ | ||
49 | struct request *active_req; | ||
50 | wait_queue_head_t active_wq; | ||
51 | struct list_head waiting_queue; /* Requests to be sent */ | ||
52 | wait_queue_head_t waiting_wq; | ||
53 | |||
54 | struct mutex tx_lock; | ||
55 | struct gendisk *disk; | ||
56 | int blksize; | ||
57 | u64 bytesize; | ||
58 | pid_t pid; /* pid of nbd-client, if attached */ | ||
59 | int xmit_timeout; | ||
60 | int disconnect; /* a disconnect has been requested by user */ | ||
61 | }; | ||
62 | |||
41 | #define NBD_MAGIC 0x68797548 | 63 | #define NBD_MAGIC 0x68797548 |
42 | 64 | ||
43 | #ifdef NDEBUG | 65 | #ifdef NDEBUG |