Re: [PATCH] block: fix blk_queue_alignment_offset

From: Martin K. Petersen
Date: Sun Jul 19 2009 - 22:20:27 EST


>>>>> "hch" == Christoph Hellwig <hch@xxxxxx> writes:

hch> We need to mask out bits inside the logical block, not outside of
hch> it, otherwise we'll always get a 0 alignment_offset.

The alignment_offset only makes sense if physical_block_size >
logical_block_size. For instance (63 * 512) & (4096 - 1) = 3584.

Your patch would yield 28672 = 4096 * 7 and that's incorrect; LBA 63 is
not aligned on a 4KB boundary...

--
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/