| 1 | |
| 2 | * 1999 Copyright (C) Pavel Machek, [email protected]. This code is GPL.
|
| 3 | * 1999/11/04 Copyright (C) 1999 VMware, Inc. (Regis "HPReg" Duchesne)
|
| 4 | * Made nbd_end_request() use the io_request_lock
|
| 5 | * 2001 Copyright (C) Steven Whitehouse
|
| 6 | * New nbd_end_request() for compatibility with new linux block
|
| 7 | * layer code.
|
| 8 | * 2003/06/24 Louis D. Langholtz <[email protected]>
|
| 9 | * Removed unneeded blksize_bits field from nbd_device struct.
|
| 10 | * Cleanup PARANOIA usage & code.
|
| 11 | * 2004/02/19 Paul Clements
|
| 12 | * Removed PARANOIA, plus various cleanup and comments
|
| 13 |
|
| 14 | #ifndef LINUX_NBD_H
|
| 15 | #define LINUX_NBD_H
|
| 16 |
|
| 17 |
|
| 18 | #include <linux/wait.h>
|
| 19 | #include <linux/mutex.h>
|
| 20 | #include <uapi/linux/nbd.h>
|
| 21 |
|
| 22 | struct request;
|
| 23 |
|
| 24 | struct nbd_device {
|
| 25 | int flags;
|
| 26 | int harderror;
|
| 27 | struct socket * sock;
|
| 28 | int magic;
|
| 29 |
|
| 30 | spinlock_t queue_lock;
|
| 31 | struct list_head queue_head;
|
| 32 | struct request *active_req;
|
| 33 | wait_queue_head_t active_wq;
|
| 34 | struct list_head waiting_queue;
|
| 35 | wait_queue_head_t waiting_wq;
|
| 36 |
|
| 37 | struct mutex tx_lock;
|
| 38 | struct gendisk *disk;
|
| 39 | int blksize;
|
| 40 | u64 bytesize;
|
| 41 | pid_t pid;
|
| 42 | int xmit_timeout;
|
| 43 | int disconnect;
|
| 44 | };
|
| 45 |
|
| 46 | #endif
|