xref: /illumos-gate/usr/src/common/zfs/zfs_comutil.h (revision e0f1c0af)
1b7b97454Sperrin /*
2b7b97454Sperrin  * CDDL HEADER START
3b7b97454Sperrin  *
4b7b97454Sperrin  * The contents of this file are subject to the terms of the
5b7b97454Sperrin  * Common Development and Distribution License (the "License").
6b7b97454Sperrin  * You may not use this file except in compliance with the License.
7b7b97454Sperrin  *
8b7b97454Sperrin  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9b7b97454Sperrin  * or http://www.opensolaris.org/os/licensing.
10b7b97454Sperrin  * See the License for the specific language governing permissions
11b7b97454Sperrin  * and limitations under the License.
12b7b97454Sperrin  *
13b7b97454Sperrin  * When distributing Covered Code, include this CDDL HEADER in each
14b7b97454Sperrin  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15b7b97454Sperrin  * If applicable, add the following below this CDDL HEADER, with the
16b7b97454Sperrin  * fields enclosed by brackets "[]" replaced with your own identifying
17b7b97454Sperrin  * information: Portions Copyright [yyyy] [name of copyright owner]
18b7b97454Sperrin  *
19b7b97454Sperrin  * CDDL HEADER END
20b7b97454Sperrin  */
21b7b97454Sperrin /*
223f9d6ad7SLin Ling  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
235dafeea3SPavel Zakharov  * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
24*e0f1c0afSOlaf Faaland  * Copyright 2019 Joyent, Inc.
25b7b97454Sperrin  */
26b7b97454Sperrin 
27b7b97454Sperrin #ifndef	_ZFS_COMUTIL_H
28b7b97454Sperrin #define	_ZFS_COMUTIL_H
29b7b97454Sperrin 
30b7b97454Sperrin #include <sys/fs/zfs.h>
31b7b97454Sperrin #include <sys/types.h>
32b7b97454Sperrin 
33b7b97454Sperrin #ifdef	__cplusplus
34b7b97454Sperrin extern "C" {
35b7b97454Sperrin #endif
36b7b97454Sperrin 
37*e0f1c0afSOlaf Faaland /* Needed for ZoL errno usage in MMP kernel and user code */
38*e0f1c0afSOlaf Faaland #define	EREMOTEIO EREMOTE
39*e0f1c0afSOlaf Faaland 
40468c413aSTim Haley extern boolean_t zfs_allocatable_devs(nvlist_t *);
415dafeea3SPavel Zakharov extern void zpool_get_load_policy(nvlist_t *, zpool_load_policy_t *);
42b7b97454Sperrin 
430a586ceaSMark Shellenbaum extern int zfs_zpl_version_map(int spa_version);
440a586ceaSMark Shellenbaum extern int zfs_spa_version_map(int zpl_version);
454445fffbSMatthew Ahrens #define	ZFS_NUM_LEGACY_HISTORY_EVENTS 41
464445fffbSMatthew Ahrens extern const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS];
470a586ceaSMark Shellenbaum 
48b7b97454Sperrin #ifdef	__cplusplus
49b7b97454Sperrin }
50b7b97454Sperrin #endif
51b7b97454Sperrin 
52b7b97454Sperrin #endif	/* _ZFS_COMUTIL_H */
53