lkml.org 
[lkml]   [2009]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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);

\
 
 \ /
  Last update: 2009-07-20 00:39    [W:0.052 / U:1.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site