summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2002-10-27 17:15:53 -0800
committerJens Axboe <axboe@suse.de>2002-10-27 17:15:53 -0800
commit0717c0a96379ba634411b99a806587acad9f9fee (patch)
tree173d677d682cde28dbb823a72fe82120a90c267c /include/linux/blkdev.h
parent8c1f67fa9454c9d86ad4124bd2e5d1b2720b4e1e (diff)
[PATCH] make queue prep_rq_fn() a bit more powerful
Extend q->prep_rq_fn() to return one of three values: o BLKPREP_OK: request is good, return it o BLKPREP_KILL: request is bad, end it completely o BLKPREP_DEFER: request is good, but we can't take it now We maintain compatability with old prep functions (if any, outside of ide-cd). This change is needed or SCSI to use prep function for command init, if sg table allocation fails we can just defer the request.
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6437522be832..7ac2b3bb88e5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -254,6 +254,13 @@ struct request_queue
*/
#define blk_queue_headactive(q, head_active)
+/*
+ * q->prep_rq_fn return values
+ */
+#define BLKPREP_OK 0 /* serve it */
+#define BLKPREP_KILL 1 /* fatal error, kill */
+#define BLKPREP_DEFER 2 /* leave on queue */
+
extern unsigned long blk_max_low_pfn, blk_max_pfn;
/*