zfeature_common.h revision a6f561b4aee75d0d028e7b36b151c8ed8a86bc76
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright (c) 2012 by Delphix. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern "C" {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintypedef struct zfeature_info {
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz const char *fi_guid; /* On-disk feature identifier */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin boolean_t fi_can_readonly; /* Can open pool readonly w/o support? */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz boolean_t fi_mos; /* Is the feature necessary to read the MOS? */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin struct zfeature_info **fi_depends; /* array; null terminated */
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainztypedef int (zfeature_func_t)(zfeature_info_t *fi, void *arg);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern boolean_t zfeature_is_valid_guid(const char *);
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzextern boolean_t zfeature_is_supported(const char *);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int zfeature_lookup_guid(const char *, zfeature_info_t **res);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern int zfeature_lookup_name(const char *, zfeature_info_t **res);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern void zpool_feature_init(void);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _ZFEATURE_COMMON_H */