diff options
| author | Sebastien Roy <seb@delphix.com> | 2017-01-12 13:27:24 -0500 |
|---|---|---|
| committer | Prakash Surya <prakash.surya@delphix.com> | 2018-05-15 15:59:28 -0700 |
| commit | 591e0e133f9980083db5d64ac33a30bcc3382ff7 (patch) | |
| tree | 4494f1d0592050bc9ada1a04db41f07e7e301fe5 /usr/src/lib/libzfs/common/libzfs_impl.h | |
| parent | b4bf0cf0458759c67920a031021a9d96cd683cfe (diff) | |
| download | illumos-gate-591e0e133f9980083db5d64ac33a30bcc3382ff7.tar.gz | |
8115 parallel zfs mount
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Approved by: Matt Ahrens <mahrens@delphix.com>
Diffstat (limited to 'usr/src/lib/libzfs/common/libzfs_impl.h')
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_impl.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_impl.h b/usr/src/lib/libzfs/common/libzfs_impl.h index 50f48fd793..cd9a53d91f 100644 --- a/usr/src/lib/libzfs/common/libzfs_impl.h +++ b/usr/src/lib/libzfs/common/libzfs_impl.h @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek. All rights reserved. - * Copyright (c) 2011, 2016 by Delphix. All rights reserved. + * Copyright (c) 2011, 2017 by Delphix. All rights reserved. */ #ifndef _LIBZFS_IMPL_H @@ -33,6 +33,7 @@ #include <sys/nvpair.h> #include <sys/dmu.h> #include <sys/zfs_ioctl.h> +#include <synch.h> #include <libuutil.h> #include <libzfs.h> @@ -73,6 +74,13 @@ struct libzfs_handle { int libzfs_storeerr; /* stuff error messages into buffer */ void *libzfs_sharehdl; /* libshare handle */ 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. + */ + mutex_t libzfs_mnttab_cache_lock; avl_tree_t libzfs_mnttab_cache; int libzfs_pool_iter; topo_hdl_t *libzfs_topo_hdl; |
