mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 19:39:35 +03:00
976246fadd
The phase 2 work primarily entails the Diagnosis Engine and the Retire Agent modules. It also includes infrastructure to support a crude FMD environment to host these modules. The Diagnosis Engine consumes I/O and checksum ereports and feeds them into a SERD engine which will generate a corres- ponding fault diagnosis when the SERD engine fires. All the diagnosis state data is collected into cases, one case per vdev being tracked. The Retire Agent responds to diagnosed faults by isolating the faulty VDEV. It will notify the ZFS kernel module of the new VDEV state (degraded or faulted). This agent is also responsible for managing hot spares across pools. When it encounters a device fault or a device removal it replaces the device with an appropriate spare if available. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@intel.com> Closes #5343
54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
/*
|
|
* CDDL HEADER START
|
|
*
|
|
* The contents of this file are subject to the terms of the
|
|
* Common Development and Distribution License Version 1.0 (CDDL-1.0).
|
|
* You can obtain a copy of the license from the top-level file
|
|
* "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
|
|
* You may not use this file except in compliance with the license.
|
|
*
|
|
* CDDL HEADER END
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2016, Intel Corporation.
|
|
*/
|
|
|
|
#ifndef ZFS_AGENTS_H
|
|
#define ZFS_AGENTS_H
|
|
|
|
#include <libzfs.h>
|
|
#include <libnvpair.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* Agent abstraction presented to ZED
|
|
*/
|
|
extern void zfs_agent_init(libzfs_handle_t *);
|
|
extern void zfs_agent_fini(void);
|
|
extern void zfs_agent_post_event(const char *, const char *, nvlist_t *);
|
|
|
|
/*
|
|
* ZFS Sysevent Linkable Module (SLM)
|
|
*/
|
|
extern int zfs_slm_init(void);
|
|
extern void zfs_slm_fini(void);
|
|
extern void zfs_slm_event(const char *, const char *, nvlist_t *);
|
|
|
|
/*
|
|
* In ZED context, all the FMA agents run in the same thread
|
|
* and do not require a unique libzfs instance.
|
|
*/
|
|
extern libzfs_handle_t *__libzfs_init(void);
|
|
extern void __libzfs_fini(libzfs_handle_t *);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* !ZFS_AGENTS_H */
|