mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
block: separate out padding from alignment
Block layer alignment was used for two different purposes - memory
alignment and padding. This causes problems in lower layers because
drivers which only require memory alignment ends up with adjusted
rq->data_len. Separate out padding such that padding occurs iff
driver explicitly requests it.
Tomo: restorethe code to update bio in blk_rq_map_user
introduced by the commit 40b01b9bbd
according to padding alignment.
Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
7a85f8896f
commit
e3790c7d42
4 changed files with 34 additions and 8 deletions
|
|
@ -862,9 +862,10 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
|
|||
struct request_queue *q = sdev->request_queue;
|
||||
void *buf;
|
||||
|
||||
/* set the min alignment */
|
||||
/* set the min alignment and padding */
|
||||
blk_queue_update_dma_alignment(sdev->request_queue,
|
||||
ATA_DMA_PAD_SZ - 1);
|
||||
blk_queue_dma_pad(sdev->request_queue, ATA_DMA_PAD_SZ - 1);
|
||||
|
||||
/* configure draining */
|
||||
buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue