diff options
author | Alasdair G Kergon <agk@redhat.com> | 2006-06-26 03:27:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:35 -0400 |
commit | 29121bd0b00ebb9524971a583fea4a2f7afe8041 (patch) | |
tree | 499be8e6dea167fd9a17ccce11467d6bdd1c40dc /drivers/md | |
parent | b7cca195c4cc051210f3e60a859b779ca833a2e4 (diff) |
[PATCH] dm mirror log: bitset_size fix
Fix the 'sizeof' in the region log bitmap size calculation: it's uint32_t, not
unsigned long - this breaks on some archs.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index f52a78fc82bb..33d80721667c 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c | |||
@@ -295,10 +295,10 @@ static int create_log_context(struct dirty_log *log, struct dm_target *ti, | |||
295 | * Work out how many "unsigned long"s we need to hold the bitset. | 295 | * Work out how many "unsigned long"s we need to hold the bitset. |
296 | */ | 296 | */ |
297 | bitset_size = dm_round_up(region_count, | 297 | bitset_size = dm_round_up(region_count, |
298 | sizeof(unsigned long) << BYTE_SHIFT); | 298 | sizeof(*lc->clean_bits) << BYTE_SHIFT); |
299 | bitset_size >>= BYTE_SHIFT; | 299 | bitset_size >>= BYTE_SHIFT; |
300 | 300 | ||
301 | lc->bitset_uint32_count = bitset_size / 4; | 301 | lc->bitset_uint32_count = bitset_size / sizeof(*lc->clean_bits); |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Disk log? | 304 | * Disk log? |