mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-28 02:44:30 +03:00
Skip rate limiting events in zfs_ereport_post
In zfs_ereport_post, if an event is a rate limiting event, immediately return before any processing is done. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes #5998
This commit is contained in:
parent
dbb38f6605
commit
17b43f96f9
@ -778,15 +778,15 @@ zfs_ereport_post(const char *subclass, spa_t *spa, vdev_t *vd, zio_t *zio,
|
|||||||
nvlist_t *ereport = NULL;
|
nvlist_t *ereport = NULL;
|
||||||
nvlist_t *detector = NULL;
|
nvlist_t *detector = NULL;
|
||||||
|
|
||||||
|
if (zfs_is_ratelimiting_event(subclass, vd))
|
||||||
|
return;
|
||||||
|
|
||||||
zfs_ereport_start(&ereport, &detector,
|
zfs_ereport_start(&ereport, &detector,
|
||||||
subclass, spa, vd, zio, stateoroffset, size);
|
subclass, spa, vd, zio, stateoroffset, size);
|
||||||
|
|
||||||
if (ereport == NULL)
|
if (ereport == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (zfs_is_ratelimiting_event(subclass, vd))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Cleanup is handled by the callback function */
|
/* Cleanup is handled by the callback function */
|
||||||
zfs_zevent_post(ereport, detector, zfs_zevent_post_cb);
|
zfs_zevent_post(ereport, detector, zfs_zevent_post_cb);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user