summaryrefslogtreecommitdiffstats
path: root/common/dnbd.h
blob: eb8de33e76b0177ab83115142bd4ce146c71fba2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define DNBD_MAJOR 43
#define MAX_DNBD 32

struct dnbd_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 gendisk *disk;
	int blksize;
	u64 bytesize;
};

typedef struct dnbd_device dnbd_device_t;