1 // SPDX-License-Identifier: CDDL-1.0 2 /* 3 * CDDL HEADER START 4 * 5 * The contents of this file are subject to the terms of the 6 * Common Development and Distribution License (the "License"). 7 * You may not use this file except in compliance with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or https://opensource.org/licenses/CDDL-1.0. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 2018 by Delphix. All rights reserved. 24 */ 25 26 #ifndef _SYS_ZFS_SYSFS_H 27 #define _SYS_ZFS_SYSFS_H extern __attribute__((visibility("default"))) 28 29 struct zfs_mod_supported_features; 30 struct zfs_mod_supported_features *zfs_mod_list_supported(const char *scope); 31 void zfs_mod_list_supported_free(struct zfs_mod_supported_features *); 32 33 #ifdef _KERNEL 34 35 void zfs_sysfs_init(void); 36 void zfs_sysfs_fini(void); 37 38 #else 39 40 #define zfs_sysfs_init() 41 #define zfs_sysfs_fini() 42 43 _SYS_ZFS_SYSFS_H boolean_t zfs_mod_supported(const char *, const char *, 44 const struct zfs_mod_supported_features *); 45 #endif 46 47 #define ZFS_SYSFS_POOL_PROPERTIES "properties.pool" 48 #define ZFS_SYSFS_VDEV_PROPERTIES "properties.vdev" 49 #define ZFS_SYSFS_DATASET_PROPERTIES "properties.dataset" 50 #define ZFS_SYSFS_KERNEL_FEATURES "features.kernel" 51 #define ZFS_SYSFS_POOL_FEATURES "features.pool" 52 53 #define ZFS_SYSFS_DIR "/sys/module/zfs" 54 /* Alternate location when ZFS is built as part of the kernel (rare) */ 55 #define ZFS_SYSFS_ALT_DIR "/sys/fs/zfs" 56 57 #endif /* _SYS_ZFS_SYSFS_H */ 58