]> git.proxmox.com Git - mirror_zfs.git/blame - include/sys/sysevent/eventdefs.h
Teach zpool scrub to scrub only blocks in error log
[mirror_zfs.git] / include / sys / sysevent / eventdefs.h
CommitLineData
fb390aaf
HR
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1d3ba0bf 9 * or https://opensource.org/licenses/CDDL-1.0.
fb390aaf
HR
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
12fa0466 24 * Copyright 2017 Joyent, Inc.
fb390aaf
HR
25 */
26
27#ifndef _SYS_SYSEVENT_EVENTDEFS_H
28#define _SYS_SYSEVENT_EVENTDEFS_H
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/*
35 * eventdefs.h contains public definitions for sysevent types (classes
36 * and subclasses). All additions/removal/changes are subject
37 * to PSARC approval.
38 */
39
40/* Sysevent Class definitions */
41#define EC_NONE "EC_none"
42#define EC_PRIV "EC_priv"
43#define EC_PLATFORM "EC_platform" /* events private to platform */
44#define EC_DR "EC_dr" /* Dynamic reconfiguration event class */
45#define EC_ENV "EC_env" /* Environmental monitor event class */
46#define EC_DOMAIN "EC_domain" /* Domain event class */
47#define EC_AP_DRIVER "EC_ap_driver" /* Alternate Pathing event class */
48#define EC_IPMP "EC_ipmp" /* IP Multipathing event class */
49#define EC_DEV_ADD "EC_dev_add" /* device add event class */
50#define EC_DEV_REMOVE "EC_dev_remove" /* device remove event class */
51#define EC_DEV_BRANCH "EC_dev_branch" /* device tree branch event class */
52#define EC_DEV_STATUS "EC_dev_status" /* device status event class */
53#define EC_FM "EC_fm" /* FMA error report event */
54#define EC_ZFS "EC_zfs" /* ZFS event */
55#define EC_DATALINK "EC_datalink" /* datalink event */
56#define EC_VRRP "EC_vrrp" /* VRRP event */
57
58/*
59 * EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
60 * (name/value pairs) are found in sys/sysevent/dev.h
61 */
62#define ESC_DISK "disk" /* disk device */
63#define ESC_NETWORK "network" /* network interface */
64#define ESC_PRINTER "printer" /* printer device */
65#define ESC_LOFI "lofi" /* lofi device */
66
67/*
68 * EC_DEV_BRANCH subclass definitions - supporting attributes (name/value pairs)
69 * are found in sys/sysevent/dev.h
70 */
71
72/* device tree branch added */
73#define ESC_DEV_BRANCH_ADD "dev_branch_add"
74
75/* device tree branch removed */
76#define ESC_DEV_BRANCH_REMOVE "dev_branch_remove"
77
78/*
79 * EC_DEV_STATUS subclass definitions
80 *
81 * device capacity dynamically changed
82 */
83#define ESC_DEV_DLE "dev_dle"
84
85/* LUN has received an eject request from the user */
86#define ESC_DEV_EJECT_REQUEST "dev_eject_request"
87
88/* FMA Fault and Error event protocol subclass */
89#define ESC_FM_ERROR "error"
90#define ESC_FM_ERROR_REPLAY "error_replay"
91
92/*
93 * ZFS subclass definitions. supporting attributes (name/value paris) are found
94 * in sys/fs/zfs.h
95 */
96#define ESC_ZFS_RESILVER_START "resilver_start"
97#define ESC_ZFS_RESILVER_FINISH "resilver_finish"
98#define ESC_ZFS_VDEV_REMOVE "vdev_remove"
99#define ESC_ZFS_VDEV_REMOVE_AUX "vdev_remove_aux"
100#define ESC_ZFS_VDEV_REMOVE_DEV "vdev_remove_dev"
101#define ESC_ZFS_POOL_CREATE "pool_create"
102#define ESC_ZFS_POOL_DESTROY "pool_destroy"
103#define ESC_ZFS_POOL_IMPORT "pool_import"
d5e024cb 104#define ESC_ZFS_POOL_EXPORT "pool_export"
fb390aaf
HR
105#define ESC_ZFS_VDEV_ADD "vdev_add"
106#define ESC_ZFS_VDEV_ATTACH "vdev_attach"
107#define ESC_ZFS_VDEV_CLEAR "vdev_clear"
108#define ESC_ZFS_VDEV_CHECK "vdev_check"
109#define ESC_ZFS_VDEV_ONLINE "vdev_online"
110#define ESC_ZFS_CONFIG_SYNC "config_sync"
111#define ESC_ZFS_SCRUB_START "scrub_start"
112#define ESC_ZFS_SCRUB_FINISH "scrub_finish"
43cb30b3
SEF
113#define ESC_ZFS_SCRUB_ABORT "scrub_abort"
114#define ESC_ZFS_SCRUB_RESUME "scrub_resume"
115#define ESC_ZFS_SCRUB_PAUSED "scrub_paused"
fb390aaf
HR
116#define ESC_ZFS_VDEV_SPARE "vdev_spare"
117#define ESC_ZFS_VDEV_AUTOEXPAND "vdev_autoexpand"
118#define ESC_ZFS_BOOTFS_VDEV_ATTACH "bootfs_vdev_attach"
119#define ESC_ZFS_POOL_REGUID "pool_reguid"
12fa0466 120#define ESC_ZFS_HISTORY_EVENT "history_event"
1b939560
BB
121#define ESC_ZFS_TRIM_START "trim_start"
122#define ESC_ZFS_TRIM_FINISH "trim_finish"
123#define ESC_ZFS_TRIM_CANCEL "trim_cancel"
124#define ESC_ZFS_TRIM_RESUME "trim_resume"
125#define ESC_ZFS_TRIM_SUSPEND "trim_suspend"
482eeef8
GA
126#define ESC_ZFS_ERRORSCRUB_START "errorscrub_start"
127#define ESC_ZFS_ERRORSCRUB_FINISH "errorscrub_finish"
128#define ESC_ZFS_ERRORSCRUB_ABORT "errorscrub_abort"
129#define ESC_ZFS_ERRORSCRUB_RESUME "errorscrub_resume"
130#define ESC_ZFS_ERRORSCRUB_PAUSED "errorscrub_paused"
fb390aaf
HR
131
132/*
133 * datalink subclass definitions.
134 */
135#define ESC_DATALINK_PHYS_ADD "datalink_phys_add" /* new physical link */
136
137#ifdef __cplusplus
138}
139#endif
140
141#endif /* _SYS_SYSEVENT_EVENTDEFS_H */