mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Multipath autoreplace, control enclosure LEDs, event rate limiting
1. Enable multipath autoreplace support for FMA. This extends FMA autoreplace to work with multipath disks. This requires libdevmapper to be installed at build time. 2. Turn on/off fault LEDs when VDEVs become degraded/faulted/online Set ZED_USE_ENCLOSURE_LEDS=1 in zed.rc to have ZED turn on/off the enclosure LED for a drive when a drive becomes FAULTED/DEGRADED. Your enclosure must be supported by the Linux SES driver for this to work. The enclosure LED scripts work for multipath devices as well. The scripts will clear the LED when the fault is cleared. 3. Rate limit ZIO delay and checksum events so as not to flood ZED ZIO delay and checksum events are rate limited to 5/sec in the zfs module. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed by: Don Brady <don.brady@intel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #2449 Closes #3017 Closes #5159
This commit is contained in:
committed by
Brian Behlendorf
parent
7c502b0b1d
commit
6078881aa1
@@ -84,6 +84,9 @@ static int zevent_len_cur = 0;
|
||||
static int zevent_waiters = 0;
|
||||
static int zevent_flags = 0;
|
||||
|
||||
/* Num events rate limited since the last time zfs_zevent_next() was called */
|
||||
static uint64_t ratelimit_dropped = 0;
|
||||
|
||||
/*
|
||||
* The EID (Event IDentifier) is used to uniquely tag a zevent when it is
|
||||
* posted. The posted EIDs are monotonically increasing but not persistent.
|
||||
@@ -654,6 +657,12 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
|
||||
list_insert_head(&ev->ev_ze_list, ze);
|
||||
(void) nvlist_dup(ev->ev_nvl, event, KM_SLEEP);
|
||||
*dropped = ze->ze_dropped;
|
||||
|
||||
#ifdef _KERNEL
|
||||
/* Include events dropped due to rate limiting */
|
||||
*dropped += ratelimit_dropped;
|
||||
ratelimit_dropped = 0;
|
||||
#endif
|
||||
ze->ze_dropped = 0;
|
||||
out:
|
||||
mutex_exit(&zevent_lock);
|
||||
@@ -1586,6 +1595,19 @@ fm_ena_time_get(uint64_t ena)
|
||||
return (time);
|
||||
}
|
||||
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
* Helper function to increment ereport dropped count. Used by the event
|
||||
* rate limiting code to give feedback to the user about how many events were
|
||||
* rate limited by including them in the 'dropped' count.
|
||||
*/
|
||||
void
|
||||
fm_erpt_dropped_increment(void)
|
||||
{
|
||||
atomic_inc_64(&ratelimit_dropped);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
void
|
||||
fm_init(void)
|
||||
|
||||
Reference in New Issue
Block a user