]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/libzfs_impl.h
OpenZFS 9185 - Enable testing over NFS in ZFS performance tests
[mirror_zfs.git] / include / libzfs_impl.h
index 959ba85b7918127028936da60cc54c552b901d67..9a46b9f12960a16594b9b6034934a40fe937790c 100644 (file)
@@ -21,7 +21,8 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2018 Datto Inc.
  */
 
 #ifndef        _LIBZFS_IMPL_H
@@ -59,6 +60,13 @@ struct libzfs_handle {
        void *libzfs_sharehdl; /* libshare handle */
        uint_t libzfs_shareflags;
        boolean_t libzfs_mnttab_enable;
+       /*
+        * We need a lock to handle the case where parallel mount
+        * threads are populating the mnttab cache simultaneously. The
+        * lock only protects the integrity of the avl tree, and does
+        * not protect the contents of the mnttab entries themselves.
+        */
+       pthread_mutex_t libzfs_mnttab_cache_lock;
        avl_tree_t libzfs_mnttab_cache;
        int libzfs_pool_iter;
        char libzfs_chassis_id[256];
@@ -146,6 +154,10 @@ int zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp,
  * mounted.
  */
 #define        CL_GATHER_MOUNT_ALWAYS  1
+/*
+ * changelist_gather() flag to force it to iterate on mounted datasets only
+ */
+#define        CL_GATHER_ITER_MOUNTED  2
 
 typedef struct prop_changelist prop_changelist_t;