Skip to content

Commit bc79288

Browse files
efarmanaxboe
authored andcommitted
s390/dasd: Establish DMA alignment
linux-next commit bf8d085 ("iomap: add support for dma aligned direct-io") changes the alignment requirement to come from the block device rather than the block size, and the default alignment requirement is 512-byte boundaries. Since DASD I/O has page alignments for IDAW/TIDAW requests, let's override this value to restore the expected behavior. Make this change for both ECKD and DIAG disciplines, as they both would fall into this category. Leave FBA alone, since it is always comprised of 512-byte blocks. Signed-off-by: Eric Farman <[email protected]> Acked-by: Halil Pasic <[email protected]> Reviewed-by: Stefan Haberland <[email protected]> Signed-off-by: Stefan Haberland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent bcee43d commit bc79288

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/s390/block/dasd_diag.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ static void dasd_diag_setup_blk_queue(struct dasd_block *block)
639639
/* With page sized segments each segment can be translated into one idaw/tidaw */
640640
blk_queue_max_segment_size(q, PAGE_SIZE);
641641
blk_queue_segment_boundary(q, PAGE_SIZE - 1);
642+
blk_queue_dma_alignment(q, PAGE_SIZE - 1);
642643
}
643644

644645
static int dasd_diag_pe_handler(struct dasd_device *device,

drivers/s390/block/dasd_eckd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6626,6 +6626,7 @@ static void dasd_eckd_setup_blk_queue(struct dasd_block *block)
66266626
/* With page sized segments each segment can be translated into one idaw/tidaw */
66276627
blk_queue_max_segment_size(q, PAGE_SIZE);
66286628
blk_queue_segment_boundary(q, PAGE_SIZE - 1);
6629+
blk_queue_dma_alignment(q, PAGE_SIZE - 1);
66296630
}
66306631

66316632
static struct ccw_driver dasd_eckd_driver = {

0 commit comments

Comments
 (0)