mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-06 00:00:49 +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
79430bf34b
commit
67819ea28d
@ -658,8 +658,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
|
|||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
/* Include events dropped due to rate limiting */
|
/* Include events dropped due to rate limiting */
|
||||||
*dropped += ratelimit_dropped;
|
*dropped += atomic_swap_64(&ratelimit_dropped, 0);
|
||||||
ratelimit_dropped = 0;
|
|
||||||
#endif
|
#endif
|
||||||
ze->ze_dropped = 0;
|
ze->ze_dropped = 0;
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user