summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2002-10-27 17:39:19 -0800
committerJens Axboe <axboe@suse.de>2002-10-27 17:39:19 -0800
commit6f04a530fa6fbcc8ad1329ce2c6b135a7b7742b6 (patch)
tree301dfb58f95a142b8910b9385d7c7de7f485ef2d /include/linux/blkdev.h
parentc5868eb784c333e89aa404ac4936a3e29f224303 (diff)
[PATCH] request references and list deletion/insertion checking
o Always use list_del_init() on request queuelist, this allows us to sanity check the integrity of the request on insertion and removal. So we can complain loudly instead of silently corrupting memory. o Add references to requests. This is cheap, since we dont have to use an atomic variable for it (all puts are inside queue lock). We've had a bug in IDE for years where we want to inspect request state after io completion, but this is not possible to do race free right now. REQ_BLOCK_PC and sgio will need this too, for checking io residual etc. This is not just a theoretical race, I've seen it happen.
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index cd9b016a8993..de87dee16f83 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -26,6 +26,8 @@ struct request {
struct list_head queuelist; /* looking for ->queue? you must _not_
* access it directly, use
* blkdev_dequeue_request! */
+ int ref_count;
+
void *elevator_private;
unsigned char cmd[16];