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.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
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]
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
25 * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
26 * Copyright 2013 Saso Kiselkov. All rights reserved.
27 * Copyright (c) 2017 Datto Inc.
28 * Copyright (c) 2017, Intel Corporation.
31 #include <sys/zfs_context.h>
32 #include <sys/spa_impl.h>
35 #include <sys/unique.h>
36 #include <sys/dsl_pool.h>
37 #include <sys/dsl_dir.h>
38 #include <sys/dsl_prop.h>
39 #include <sys/fm/util.h>
40 #include <sys/dsl_scan.h>
41 #include <sys/fs/zfs.h>
42 #include <sys/kstat.h>
47 param_set_deadman_failmode(const char *val
, zfs_kernel_param_t
*kp
)
51 error
= -param_set_deadman_failmode_common(val
);
53 error
= param_set_charp(val
, kp
);
59 param_set_deadman_ziotime(const char *val
, zfs_kernel_param_t
*kp
)
63 error
= param_set_ulong(val
, kp
);
65 return (SET_ERROR(error
));
67 spa_set_deadman_ziotime(MSEC2NSEC(zfs_deadman_ziotime_ms
));
73 param_set_deadman_synctime(const char *val
, zfs_kernel_param_t
*kp
)
77 error
= param_set_ulong(val
, kp
);
79 return (SET_ERROR(error
));
81 spa_set_deadman_synctime(MSEC2NSEC(zfs_deadman_synctime_ms
));
87 param_set_slop_shift(const char *buf
, zfs_kernel_param_t
*kp
)
92 error
= kstrtoul(buf
, 0, &val
);
94 return (SET_ERROR(error
));
96 if (val
< 1 || val
> 31)
97 return (SET_ERROR(-EINVAL
));
99 error
= param_set_int(buf
, kp
);
101 return (SET_ERROR(error
));
107 spa_history_zone(void)
113 spa_import_os(spa_t
*spa
)
119 spa_export_os(spa_t
*spa
)
125 spa_activate_os(spa_t
*spa
)
131 spa_deactivate_os(spa_t
*spa
)