mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
block: restore the meaning of rq->data_len to the true data length
The meaning of rq->data_len was changed to the length of an allocated
buffer from the true data length. It breaks SG_IO friends and
bsg. This patch restores the meaning of rq->data_len to the true data
length and adds rq->extra_len to store an extended length (due to
drain buffer and padding).
This patch also removes the code to update bio in blk_rq_map_user
introduced by the commit 40b01b9bbd
.
The commit adjusts bio according to memory alignment
(queue_dma_alignment). However, memory alignment is NOT padding
alignment. This adjustment also breaks SG_IO friends and bsg. Padding
alignment needs to be fixed in a proper way (by a separate patch).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
This commit is contained in:
parent
89b6e74378
commit
7a85f8896f
7 changed files with 13 additions and 18 deletions
|
@ -216,8 +216,8 @@ struct request {
|
|||
unsigned int cmd_len;
|
||||
unsigned char cmd[BLK_MAX_CDB];
|
||||
|
||||
unsigned int raw_data_len;
|
||||
unsigned int data_len;
|
||||
unsigned int extra_len; /* length of alignment and padding */
|
||||
unsigned int sense_len;
|
||||
void *data;
|
||||
void *sense;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue