mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Bring over illumos ZFS FMA logic -- phase 1
This first phase brings over the ZFS SLM module, zfs_mod.c, to handle auto operations in response to disk events. Disk event monitoring is provided from libudev and generates the expected payload schema for zfs_mod. This work leverages the recently added devid and phys_path strings in the vdev label. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@intel.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #4673
This commit is contained in:
committed by
Brian Behlendorf
parent
0b284702b7
commit
d02ca37979
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Agents from ZFS FMA and syseventd - linked directly into ZED daemon binary
|
||||
*/
|
||||
|
||||
/*
|
||||
* ZFS Sysevent Linkable Module (SLM)
|
||||
*/
|
||||
extern int zfs_slm_init(libzfs_handle_t *zfs_hdl);
|
||||
extern void zfs_slm_fini(void);
|
||||
extern void zfs_slm_event(const char *, const char *, nvlist_t *);
|
||||
|
||||
/*
|
||||
* ZFS FMA Retire Agent
|
||||
*/
|
||||
extern int zfs_retire_init(libzfs_handle_t *zfs_hdl);
|
||||
extern void zfs_retire_fini(void);
|
||||
extern void zfs_retire_recv(nvlist_t *nvl, const char *class);
|
||||
|
||||
/*
|
||||
* ZFS FMA Diagnosis Engine
|
||||
*/
|
||||
extern int zfs_diagnosis_init(libzfs_handle_t *zfs_hdl);
|
||||
extern void zfs_diagnosis_fini(void);
|
||||
extern void zfs_diagnosis_recv(nvlist_t *nvl, const char *class);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !ZFS_AGENTS_H */
|
||||
Reference in New Issue
Block a user