diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index ed0730798..618673797 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ 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 stats walk segfault with dmsetup older than v1.02.129 diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c index bec594af1..ee18793cc 100644 --- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c +++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c @@ -48,11 +48,11 @@ static int _process_raid_event(struct dso_state *state, char *params, const char while ((d = strchr(d, 'D'))) { 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.", dev, status->raid_type, device); - state->raid_devs[dev / 64] |= (1 << (dev % 64)); + state->raid_devs[dev / 64] |= (UINT64_C(1) << (dev % 64)); d++; dead = 1; }