summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-04-11 18:37:45 -0700
committerBrian Behlendorf <[email protected]>2017-04-11 18:37:45 -0700
commit17b43f96f9cfeb0deef7350cc016a8e28c500867 (patch)
tree88c0d2014241f6fe90f69dc5fa593cdc9598230a /module/zfs
parentdbb38f660509073f43284c6c745a4449ffd46385 (diff)
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 <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5998
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_fm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c
index 6c0b038be..68c0951f6 100644
--- a/module/zfs/zfs_fm.c
+++ b/module/zfs/zfs_fm.c
@@ -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 *detector = NULL;
+ if (zfs_is_ratelimiting_event(subclass, vd))
+ return;
+
zfs_ereport_start(&ereport, &detector,
subclass, spa, vd, zio, stateoroffset, size);
if (ereport == NULL)
return;
- if (zfs_is_ratelimiting_event(subclass, vd))
- return;
-
/* Cleanup is handled by the callback function */
zfs_zevent_post(ereport, detector, zfs_zevent_post_cb);
#endif