summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2009-06-22 11:12:33 +0200
committerAlasdair G Kergon <agk@redhat.com>2009-06-22 11:12:33 +0200
commit18d8594dd93a1ae2fafd591ec026e87d743292bf (patch)
tree9a4b0ac8512864666fef0c6e3bc26c5db172f649 /drivers/md
parentdm target:s introduce iterate devices fn (diff)
downloadlinux-18d8594dd93a1ae2fafd591ec026e87d743292bf.tar.xz
linux-18d8594dd93a1ae2fafd591ec026e87d743292bf.zip
dm log: fix create_log_context to use logical_block_size of log device
create_log_context() must use the logical_block_size from the log disk, where the I/O happens, not the target's logical_block_size. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-log.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index 6352a9ad4446..9443896ede07 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -412,9 +412,10 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
/*
* Buffer holds both header and bitset.
*/
- buf_size = dm_round_up((LOG_OFFSET << SECTOR_SHIFT) +
- bitset_size,
- ti->limits.logical_block_size);
+ buf_size =
+ dm_round_up((LOG_OFFSET << SECTOR_SHIFT) + bitset_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",