1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Fix alignment warning in bitcount calculation for raid segment.

This commit is contained in:
Milan Broz 2011-10-17 13:15:35 +00:00
parent a551de6152
commit ad2432dc68
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.68 -
==================================
Fix alignment warning in bitcount calculation for raid segment.
Allocate dm_tree structure from dm_tree pool.
Update debug logging for _resume_node.
Add functions to support thin provisioning target (API unstable).

View File

@ -1856,7 +1856,7 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
uint64_t *seg_start, char *params,
size_t paramsize)
{
uint32_t i, *tmp;
uint32_t i;
int param_count = 1; /* mandatory 'chunk size'/'stripe size' arg */
int pos = 0;
@ -1866,9 +1866,9 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
if (seg->region_size)
param_count += 2;
tmp = (uint32_t *)(&seg->rebuilds); /* rebuilds is 64-bit */
param_count += 2 * hweight32(tmp[0]);
param_count += 2 * hweight32(tmp[1]);
/* rebuilds is 64-bit */
param_count += 2 * hweight32(seg->rebuilds & 0xFFFFFFFF);
param_count += 2 * hweight32(seg->rebuilds >> 32);
if ((seg->type == SEG_RAID1) && seg->stripe_size)
log_error("WARNING: Ignoring RAID1 stripe size");