[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090719223649.GA32719@lst.de>
Date: Mon, 20 Jul 2009 00:36:49 +0200
From: Christoph Hellwig <hch@....de>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-kernel@...r.kernel.org
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@....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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists