summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@suse.de>2009-04-27 14:53:54 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 07:37:37 +0200
commit9eb55b030c4b3227334ee4482402096cd1d1a6fe (patch)
treee6c5c6e31692c715b911b18474ef6e4c627723bd /block
parentc69d48540c201394d08cb4d48b905e001313d9b8 (diff)
block: catch trying to use more bits than request->cmd_flags has
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 1e3b97f0ae6..394c5bd8127 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2097,6 +2097,9 @@ EXPORT_SYMBOL(kblockd_schedule_work);
int __init blk_dev_init(void)
{
+ BUILD_BUG_ON(__REQ_NR_BITS > 8 *
+ sizeof(((struct request *)0)->cmd_flags));
+
kblockd_workqueue = create_workqueue("kblockd");
if (!kblockd_workqueue)
panic("Failed to create kblockd\n");