Skip to contentSkip to conversation

dm log: fix create_log_context() to use proper logical_block_size

PATCH New Mike Snitzer 1 participant 1 message Jun 17, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dm log: fix create_log_context() to use proper logical_block_size

create_log_context() must use the logical_block_size from the log disk rather than the target's logical_block_size.

---
 drivers/md/dm-log.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-log.c +1 -1
Index: linux-2.6/drivers/md/dm-log.c
===================================================================
@@ -414,7 +414,7 @@ static int create_log_context(struct dm_
 		 */
 		buf_size = dm_round_up((LOG_OFFSET << SECTOR_SHIFT) +
 				       bitset_size,
-				       ti->limits.logical_block_size);
+				       bdev_logical_block_size(lc->header_location.bdev));
 
 		if (buf_size > i_size_read(dev->bdev->bd_inode)) {
 			DMWARN("log device %s too small: need %llu bytes",