block queue dma alignment zero
Subsystems (2)
PATCH 1/1 block queue dma alignment zero
Make queue_dma_alignment return 0 if it was specifically set to
0. Set it to the default 511 to keep the old behavior when it was not explicitly set. This permits devices with no particular alignment restrictions to use direct IO from arbitrary addresses.
Signed-off-by Pete Wyckoff <[email protected]>
--- block/ll_rw_blk.c | 2 ++ include/linux/blkdev.h | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-)
block/ll_rw_blk.c +2 -0
@@ -1925,6 +1925,8 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)blk_queue_max_hw_segments (q,MAX_HW_SEGMENTS );blk_queue_max_phys_segments (q,MAX_PHYS_SEGMENTS ); +blk_queue_dma_alignment (q,511 ); +/* * all done */
include/linux/blkdev.h +1 -6
@@ -819,12 +819,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev)static inline int queue_dma_alignment (request_queue_t *q) { -int retval =511 ; - -if (q && q->dma_alignment) - retval = q->dma_alignment; - -return retval; +return q ? q->dma_alignment :511 ; }/* assumes size > 256 */
Signature · 1 line
1.5.0.2