mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
raid: dmeventd plugin use 64bit arithmetic
Coverity suggested to used 64bit unsigned ints instead of signed 32b int. Assuming there is no user of >31legs raid array.
This commit is contained in:
parent
e95a252974
commit
ee04f1fcfd
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.136 -
|
Version 1.02.136 -
|
||||||
======================================
|
======================================
|
||||||
|
Use unsigned math when checking more then 31 legs of raid.
|
||||||
Fix 'dmstats delete' with dmsetup older than v1.02.129
|
Fix 'dmstats delete' with dmsetup older than v1.02.129
|
||||||
Fix stats walk segfault with dmsetup older than v1.02.129
|
Fix stats walk segfault with dmsetup older than v1.02.129
|
||||||
|
|
||||||
|
@ -48,11 +48,11 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
|
|||||||
while ((d = strchr(d, 'D'))) {
|
while ((d = strchr(d, 'D'))) {
|
||||||
uint32_t dev = (uint32_t)(d - status->dev_health);
|
uint32_t dev = (uint32_t)(d - status->dev_health);
|
||||||
|
|
||||||
if (!(state->raid_devs[dev / 64] & (1 << (dev % 64))))
|
if (!(state->raid_devs[dev / 64] & (UINT64_C(1) << (dev % 64))))
|
||||||
log_error("Device #%u of %s array, %s, has failed.",
|
log_error("Device #%u of %s array, %s, has failed.",
|
||||||
dev, status->raid_type, device);
|
dev, status->raid_type, device);
|
||||||
|
|
||||||
state->raid_devs[dev / 64] |= (1 << (dev % 64));
|
state->raid_devs[dev / 64] |= (UINT64_C(1) << (dev % 64));
|
||||||
d++;
|
d++;
|
||||||
dead = 1;
|
dead = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user