drbd: fix al-to-on-disk-bitmap for 4k logical_block_size
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 4 Mar 2010 14:52:30 +0000 (15:52 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 11 Mar 2010 15:33:46 +0000 (16:33 +0100)
commit39ad2bbb5900d1bc9ae8f06cebb4cb2529d9e42e
treeffde415c880275bed82a30f172d9c94ef929398f
parent1f55243024087b56aef0b1e6d9c0ea89c76f0a6b
drbd: fix al-to-on-disk-bitmap for 4k logical_block_size

Up to now, applying the in-core activity-log to the on-disk
bitmap did not care for logical_block_size.

On logical_block_size != 512 byte, this very likely results
in misalligned block access and spurious "io errors".

We now simply always submit aligned whole 4k blocks, fixing this
for logical block sizes of 512, 1024, 2048 and 4096.

For even larger logical block sizes, this won't work.
But I'm not aware of devices with such properties being available.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_actlog.c