Commit d7e3c3249ef23b4617393c69fe464765b4ff1645
Committed by
Jens Axboe
1 parent
d34c87e4ba
Exists in
master
and in
7 other branches
block: add large command support
This patch changes rq->cmd from the static array to a pointer to support large commands. We rarely handle large commands. So for optimization, a struct request still has a static array for a command. rq_init sets rq->cmd pointer to the static array. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff
block/blk-core.c
include/linux/blkdev.h
... | ... | @@ -215,8 +215,9 @@ |
215 | 215 | /* |
216 | 216 | * when request is used as a packet command carrier |
217 | 217 | */ |
218 | - unsigned int cmd_len; | |
219 | - unsigned char cmd[BLK_MAX_CDB]; | |
218 | + unsigned short cmd_len; | |
219 | + unsigned char __cmd[BLK_MAX_CDB]; | |
220 | + unsigned char *cmd; | |
220 | 221 | |
221 | 222 | unsigned int data_len; |
222 | 223 | unsigned int extra_len; /* length of alignment and padding */ |