Thread (30 messages) 30 messages, 6 authors, 2018-10-19

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

From: Christoph Hellwig <hch@lst.de>
Date: 2018-10-18 22:29:44
Also in: linux-fsdevel

quoted hunk ↗ jump to hunk
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 42a46744c11b..d2dbd508cb6d 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -174,6 +174,8 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
 	const unsigned max_sectors = get_max_io_size(q, bio);
 
 	bio_for_each_segment(bv, bio, iter) {
+		WARN_ON_ONCE(queue_dma_alignment(q) & bv.bv_offset);
I'd write this the other way around, although I have no good argument
for that.

Otherwise this looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help