diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nbd.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index 556b847804ca..eae4f5bbb65a 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -20,6 +20,12 @@ #define NBD_SET_SIZE_BLOCKS _IO( 0xab, 7 ) #define NBD_DISCONNECT _IO( 0xab, 8 ) +enum { + NBD_CMD_READ = 0, + NBD_CMD_WRITE = 1, + NBD_CMD_DISC = 2 +}; + #ifdef MAJOR_NR #include <asm/semaphore.h> @@ -33,6 +39,8 @@ extern int requests_in; extern int requests_out; #endif +#define nbd_cmd(req) ((req)->cmd[0]) + static void nbd_end_request(struct request *req) { @@ -68,6 +76,7 @@ struct nbd_device { struct socket * sock; struct file * file; /* If == NULL, device is not ready, yet */ int magic; /* FIXME: not if debugging is off */ + spinlock_t queue_lock; struct list_head queue_head; /* Requests are added here... */ struct semaphore tx_lock; }; |
