Messages in this thread Patch in this message | | | Date | Mon, 20 Jul 2009 00:36:49 +0200 | From | Christoph Hellwig <> | Subject | [PATCH] block: fix blk_queue_alignment_offset |
| |
We need to mask out bits inside the logical block, not outside of it, otherwise we'll always get a 0 alignment_offset.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/block/blk-settings.c =================================================================== --- linux-2.6.orig/block/blk-settings.c 2009-07-19 23:53:13.674148645 +0200 +++ linux-2.6/block/blk-settings.c 2009-07-20 00:33:06.384900956 +0200 @@ -371,7 +371,7 @@ EXPORT_SYMBOL(blk_queue_physical_block_s void blk_queue_alignment_offset(struct request_queue *q, unsigned int offset) { q->limits.alignment_offset = - offset & (q->limits.physical_block_size - 1); + offset & ~(q->limits.physical_block_size - 1); q->limits.misaligned = 0; } EXPORT_SYMBOL(blk_queue_alignment_offset);
| |