git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add linux topology support
[zfs.git]
/
lib
/
libzfs
/
include
/
libzfs_impl.h
diff --git
a/lib/libzfs/include/libzfs_impl.h
b/lib/libzfs/include/libzfs_impl.h
index
073499b
..
3d001df
100644
(file)
--- a/
lib/libzfs/include/libzfs_impl.h
+++ b/
lib/libzfs/include/libzfs_impl.h
@@
-20,8
+20,7
@@
*/
/*
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _LIBFS_IMPL_H
*/
#ifndef _LIBFS_IMPL_H
@@
-30,7
+29,6
@@
#include <sys/dmu.h>
#include <sys/fs/zfs.h>
#include <sys/zfs_ioctl.h>
#include <sys/dmu.h>
#include <sys/fs/zfs.h>
#include <sys/zfs_ioctl.h>
-#include <sys/zfs_acl.h>
#include <sys/spa.h>
#include <sys/nvpair.h>
#include <sys/spa.h>
#include <sys/nvpair.h>
@@
-38,6
+36,10
@@
#include <libzfs.h>
#include <libshare.h>
#include <libzfs.h>
#include <libshare.h>
+#if defined(HAVE_LIBTOPO)
+#include <fm/libtopo.h>
+#endif /* HAVE_LIBTOPO */
+
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@
-47,6
+49,13
@@
extern "C" {
#endif
#define VERIFY verify
#endif
#define VERIFY verify
+typedef struct libzfs_fru {
+ char *zf_device;
+ char *zf_fru;
+ struct libzfs_fru *zf_chain;
+ struct libzfs_fru *zf_next;
+} libzfs_fru_t;
+
struct libzfs_handle {
int libzfs_error;
int libzfs_fd;
struct libzfs_handle {
int libzfs_error;
int libzfs_fd;
@@
-61,10
+70,20
@@
struct libzfs_handle {
char libzfs_desc[1024];
char *libzfs_log_str;
int libzfs_printerr;
char libzfs_desc[1024];
char *libzfs_log_str;
int libzfs_printerr;
+ int libzfs_storeerr; /* stuff error messages into buffer */
void *libzfs_sharehdl; /* libshare handle */
uint_t libzfs_shareflags;
void *libzfs_sharehdl; /* libshare handle */
uint_t libzfs_shareflags;
+ boolean_t libzfs_mnttab_enable;
avl_tree_t libzfs_mnttab_cache;
avl_tree_t libzfs_mnttab_cache;
+ int libzfs_pool_iter;
+#if defined(HAVE_LIBTOPO)
+ topo_hdl_t *libzfs_topo_hdl;
+ libzfs_fru_t **libzfs_fru_hash;
+ libzfs_fru_t *libzfs_fru_list;
+#endif /* HAVE_LIBTOPO */
+ char libzfs_chassis_id[256];
};
};
+
#define ZFSSHARE_MISS 0x01 /* Didn't find entry in cache */
struct zfs_handle {
#define ZFSSHARE_MISS 0x01 /* Didn't find entry in cache */
struct zfs_handle {
@@
-76,8
+95,10
@@
struct zfs_handle {
dmu_objset_stats_t zfs_dmustats;
nvlist_t *zfs_props;
nvlist_t *zfs_user_props;
dmu_objset_stats_t zfs_dmustats;
nvlist_t *zfs_props;
nvlist_t *zfs_user_props;
+ nvlist_t *zfs_recvd_props;
boolean_t zfs_mntcheck;
char *zfs_mntopts;
boolean_t zfs_mntcheck;
char *zfs_mntopts;
+ uint8_t *zfs_props_table;
};
/*
};
/*
@@
-110,7
+131,6
@@
typedef enum {
*/
typedef enum {
SHARED_NOT_SHARED = 0x0,
*/
typedef enum {
SHARED_NOT_SHARED = 0x0,
- SHARED_ISCSI = 0x1,
SHARED_NFS = 0x2,
SHARED_SMB = 0x4
} zfs_share_type_t;
SHARED_NFS = 0x2,
SHARED_SMB = 0x4
} zfs_share_type_t;
@@
-120,6
+140,7
@@
int zfs_error_fmt(libzfs_handle_t *, int, const char *, ...);
void zfs_error_aux(libzfs_handle_t *, const char *, ...);
void *zfs_alloc(libzfs_handle_t *, size_t);
void *zfs_realloc(libzfs_handle_t *, void *, size_t, size_t);
void zfs_error_aux(libzfs_handle_t *, const char *, ...);
void *zfs_alloc(libzfs_handle_t *, size_t);
void *zfs_realloc(libzfs_handle_t *, void *, size_t, size_t);
+char *zfs_asprintf(libzfs_handle_t *, const char *, ...);
char *zfs_strdup(libzfs_handle_t *, const char *);
int no_memory(libzfs_handle_t *);
char *zfs_strdup(libzfs_handle_t *, const char *);
int no_memory(libzfs_handle_t *);
@@
-170,11
+191,11
@@
zfs_handle_t *make_dataset_handle(libzfs_handle_t *, const char *);
int zpool_open_silent(libzfs_handle_t *, const char *, zpool_handle_t **);
int zpool_open_silent(libzfs_handle_t *, const char *, zpool_handle_t **);
-int zvol_create_link(libzfs_handle_t *, const char *);
-int zvol_remove_link(libzfs_handle_t *, const char *);
-int zpool_iter_zvol(zpool_handle_t *, int (*)(const char *, void *), void *);
boolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
boolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
+int zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
+ boolean_t modifying);
+
void namespace_clear(libzfs_handle_t *);
/*
void namespace_clear(libzfs_handle_t *);
/*
@@
-185,8
+206,11
@@
extern int zfs_init_libshare(libzfs_handle_t *, int);
extern void zfs_uninit_libshare(libzfs_handle_t *);
extern int zfs_parse_options(char *, zfs_share_proto_t);
extern void zfs_uninit_libshare(libzfs_handle_t *);
extern int zfs_parse_options(char *, zfs_share_proto_t);
-extern int zfs_unshare_proto(zfs_handle_t *
zhp
,
+extern int zfs_unshare_proto(zfs_handle_t *,
const char *, zfs_share_proto_t *);
const char *, zfs_share_proto_t *);
+
+extern void libzfs_fru_clear(libzfs_handle_t *, boolean_t);
+
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif