aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-03 10:33:16 -0700
committerBrian Behlendorf <[email protected]>2019-10-03 10:33:16 -0700
commit73cdcc632304ed72aafabef1fb03c45a27dcc58f (patch)
treed525894fddc5da8fe0216f07903eb2f2009ceefd /include
parent7c5eff9400d12ed8f2676a6d08f6ae099351397f (diff)
OpenZFS restructuring - libzfs
Factor Linux specific functionality out of libzfs. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Macy <[email protected]> Closes #9377
Diffstat (limited to 'include')
-rw-r--r--include/libzfs_impl.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h
index 9a46b9f12..e9fd4cf41 100644
--- a/include/libzfs_impl.h
+++ b/include/libzfs_impl.h
@@ -205,6 +205,52 @@ extern int zfs_parse_options(char *, zfs_share_proto_t);
extern int zfs_unshare_proto(zfs_handle_t *,
const char *, zfs_share_proto_t *);
+typedef struct {
+ zfs_prop_t p_prop;
+ char *p_name;
+ int p_share_err;
+ int p_unshare_err;
+} proto_table_t;
+
+typedef struct differ_info {
+ zfs_handle_t *zhp;
+ char *fromsnap;
+ char *frommnt;
+ char *tosnap;
+ char *tomnt;
+ char *ds;
+ char *dsmnt;
+ char *tmpsnap;
+ char errbuf[1024];
+ boolean_t isclone;
+ boolean_t scripted;
+ boolean_t classify;
+ boolean_t timestamped;
+ uint64_t shares;
+ int zerr;
+ int cleanupfd;
+ int outputfd;
+ int datafd;
+} differ_info_t;
+
+extern proto_table_t proto_table[PROTO_END];
+
+extern int do_mount(const char *src, const char *mntpt, char *opts, int flags);
+extern int do_unmount(const char *mntpt, int flags);
+extern int zfs_can_user_mount(void);
+extern int zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto);
+extern int unshare_one(libzfs_handle_t *hdl, const char *name,
+ const char *mountpoint, zfs_share_proto_t proto);
+extern boolean_t zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t buflen,
+ zprop_source_t *source, int flags);
+extern zfs_share_type_t is_shared_impl(libzfs_handle_t *hdl,
+ const char *mountpoint, zfs_share_proto_t proto);
+extern int libzfs_load_module(void);
+extern int zpool_relabel_disk(libzfs_handle_t *hdl, const char *path,
+ const char *msg);
+extern int find_shares_object(differ_info_t *di);
+extern void libzfs_set_pipe_max(int infd);
+
#ifdef __cplusplus
}
#endif