aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-04-02 04:11:35 -0400
committerJens Axboe <axboe@fb.com>2015-04-02 14:39:18 -0400
commit13e71d69cc7444b7d840bab581dbe831e440fb62 (patch)
tree3fb5df01c11fcd7b560843e6ea9717f8ada4186e
parent4e5b44ca7b5c44872b6ec172331a5545116e2d46 (diff)
nbd: Remove kernel internal header
The header is not included anywhere. Remove it and include the private nbd_device struct in nbd.c. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/block/nbd.c22
-rw-r--r--include/linux/nbd.h46
2 files changed, 22 insertions, 46 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
41struct 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
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
deleted file mode 100644
index f62f78aef4ac..000000000000
--- a/include/linux/nbd.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * 1999 Copyright (C) Pavel Machek, pavel@ucw.cz. 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 <ldl@aros.net>
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
22struct request;
23
24struct nbd_device {
25 int flags;
26 int harderror; /* Code of hard error */
27 struct socket * sock; /* If == NULL, device is not ready, yet */
28 int magic;
29
30 spinlock_t queue_lock;
31 struct list_head queue_head; /* Requests waiting result */
32 struct request *active_req;
33 wait_queue_head_t active_wq;
34 struct list_head waiting_queue; /* Requests to be sent */
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; /* pid of nbd-client, if attached */
42 int xmit_timeout;
43 int disconnect; /* a disconnect has been requested by user */
44};
45
46#endif