mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Atomically check and set dropped zevent count
ratelimit_dropped isn't protected by a lock and is expected to be updated atomically. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11822
This commit is contained in:
parent
9f9e1b5425
commit
3ba10f9a6a
@ -657,8 +657,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
|
||||
|
||||
#ifdef _KERNEL
|
||||
/* Include events dropped due to rate limiting */
|
||||
*dropped += ratelimit_dropped;
|
||||
ratelimit_dropped = 0;
|
||||
*dropped += atomic_swap_64(&ratelimit_dropped, 0);
|
||||
#endif
|
||||
ze->ze_dropped = 0;
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user