summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-10 10:03:31 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-10 10:03:31 -0700
commitd7b92e1d95edb97d84326cb5485e85b90c62e9cc (patch)
tree69d4bbfdcb9070c18b11f725b497f4a96e59a80c /include/linux
parent4f9420c64bd8ea7996053efa9e902cbd3094bcba (diff)
[PATCH] nbd: cleanup PARANOIA usage & code
From: Lou Langholtz <ldl@aros.net> This fifth patch cleans up usage of the PARANOIA sanity checking macro and code. This patch modifies both drivers/block/nbd.c and include/linux/nbd.h. It's intended to be applied incrementally on top of my fourth patch (4.1 really if you count the memset addition as .1's worth) that simply removed unneeded blksize_bits field. Again, I wanted to get this smaller change out of the way before my next patch will is much more major.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nbd.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/linux/nbd.h b/include/linux/nbd.h
index 82bd3e78e7e4..f13d50432b0b 100644
--- a/include/linux/nbd.h
+++ b/include/linux/nbd.h
@@ -7,6 +7,7 @@
* layer code.
* 2003/06/24 Louis D. Langholtz <ldl@aros.net>
* Removed unneeded blksize_bits field from nbd_device struct.
+ * Cleanup PARANOIA usage & code.
*/
#ifndef LINUX_NBD_H
@@ -28,16 +29,12 @@ enum {
NBD_CMD_DISC = 2
};
-
-#ifdef PARANOIA
-extern int requests_in;
-extern int requests_out;
-#endif
-
#define nbd_cmd(req) ((req)->cmd[0])
-
#define MAX_NBD 128
+/* Define PARANOIA to include extra sanity checking code in here & driver */
+#define PARANOIA
+
struct nbd_device {
int refcnt;
int flags;
@@ -46,7 +43,9 @@ struct nbd_device {
#define NBD_WRITE_NOCHK 0x0002
struct socket * sock;
struct file * file; /* If == NULL, device is not ready, yet */
+#ifdef PARANOIA
int magic; /* FIXME: not if debugging is off */
+#endif
spinlock_t queue_lock;
struct list_head queue_head;/* Requests are added here... */
struct semaphore tx_lock;