summaryrefslogtreecommitdiffstats
path: root/lib/libshare/libshare_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libshare/libshare_impl.h')
-rw-r--r--lib/libshare/libshare_impl.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/libshare/libshare_impl.h b/lib/libshare/libshare_impl.h
index 18d619b10..cc5ef4008 100644
--- a/lib/libshare/libshare_impl.h
+++ b/lib/libshare/libshare_impl.h
@@ -22,36 +22,32 @@
/*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Gunnar Beutner
+ * Copyright (c) 2019, 2020 by Delphix. All rights reserved.
*/
-struct sa_handle_impl;
-
typedef struct sa_share_fsinfo {
- boolean_t active;
- char *resource;
char *shareopts;
} sa_share_fsinfo_t;
typedef struct sa_share_impl {
- struct sa_share_impl *next;
-
- struct sa_handle_impl *handle;
+ char *sa_mountpoint;
+ char *sa_zfsname;
- char *sharepath;
- char *dataset;
-
- sa_share_fsinfo_t *fsinfo; /* per-fstype information */
+ sa_share_fsinfo_t *sa_fsinfo; /* per-fstype information */
} *sa_share_impl_t;
-#define FSINFO(impl_share, fstype) (&(impl_share->fsinfo[fstype->fsinfo_index]))
+#define FSINFO(impl_share, fstype) \
+ (&(impl_share->sa_fsinfo[fstype->fsinfo_index]))
typedef struct sa_share_ops {
int (*enable_share)(sa_share_impl_t share);
int (*disable_share)(sa_share_impl_t share);
+ boolean_t (*is_shared)(sa_share_impl_t share);
int (*validate_shareopts)(const char *shareopts);
int (*update_shareopts)(sa_share_impl_t impl_share,
- const char *resource, const char *shareopts);
+ const char *shareopts);
void (*clear_shareopts)(sa_share_impl_t impl_share);
+ int (*commit_shares)(void);
} sa_share_ops_t;
typedef struct sa_fstype {
@@ -62,9 +58,4 @@ typedef struct sa_fstype {
int fsinfo_index;
} sa_fstype_t;
-typedef struct sa_handle_impl {
- libzfs_handle_t *zfs_libhandle;
- sa_share_impl_t shares;
-} *sa_handle_impl_t;
-
sa_fstype_t *register_fstype(const char *name, const sa_share_ops_t *ops);