提交 482eb689 编写于 作者: P Pete Wyckoff 提交者: Jens Axboe

block: allow queue dma_alignment of zero

Let queue_dma_alignment return 0 if it was specifically set to 0.
This permits devices with no particular alignment restrictions to
use arbitrary user space buffers without copying.
Signed-off-by: NPete Wyckoff <pw@osc.edu>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 6da127ad
......@@ -836,12 +836,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev)
static inline int queue_dma_alignment(struct request_queue *q)
{
int retval = 511;
if (q && q->dma_alignment)
retval = q->dma_alignment;
return retval;
return q ? q->dma_alignment : 511;
}
/* assumes size > 256 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册