diff options
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/dmu.h | 3 | ||||
-rw-r--r-- | include/sys/mod.h | 1 | ||||
-rw-r--r-- | include/sys/nvpair.h | 8 | ||||
-rw-r--r-- | include/sys/pathname.h | 4 | ||||
-rw-r--r-- | include/sys/spa.h | 6 | ||||
-rw-r--r-- | include/sys/u8_textprep.h | 2 | ||||
-rw-r--r-- | include/sys/zfs_context.h | 14 | ||||
-rw-r--r-- | include/sys/zfs_ioctl.h | 1 | ||||
-rw-r--r-- | include/sys/zfs_znode.h | 13 | ||||
-rw-r--r-- | include/sys/zil.h | 4 |
10 files changed, 30 insertions, 26 deletions
diff --git a/include/sys/dmu.h b/include/sys/dmu.h index d6efe2595be0..54fdbc9ad227 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -337,7 +337,6 @@ int dmu_objset_clone(const char *name, const char *origin); int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer, struct nvlist *errlist); int dmu_objset_snapshot_one(const char *fsname, const char *snapname); -int dmu_objset_snapshot_tmp(const char *, const char *, int); int dmu_objset_find(const char *name, int func(const char *, void *), void *arg, int flags); void dmu_objset_byteswap(void *buf, size_t size); @@ -1009,7 +1008,7 @@ extern int dmu_objset_blksize(objset_t *os); extern int dmu_snapshot_list_next(objset_t *os, int namelen, char *name, uint64_t *id, uint64_t *offp, boolean_t *case_conflict); extern int dmu_snapshot_lookup(objset_t *os, const char *name, uint64_t *val); -extern int dmu_snapshot_realname(objset_t *os, char *name, char *real, +extern int dmu_snapshot_realname(objset_t *os, const char *name, char *real, int maxlen, boolean_t *conflict); extern int dmu_dir_list_next(objset_t *os, int namelen, char *name, uint64_t *idp, uint64_t *offp); diff --git a/include/sys/mod.h b/include/sys/mod.h index 0ad7704afe99..a5a73ed0ee00 100644 --- a/include/sys/mod.h +++ b/include/sys/mod.h @@ -6,7 +6,6 @@ * UCRL-CODE-235197 * * This file is part of the SPL, Solaris Porting Layer. - * For details, see <http://zfsonlinux.org/>. * * The SPL is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/include/sys/nvpair.h b/include/sys/nvpair.h index e8567933d2bc..b0be8bd7ada1 100644 --- a/include/sys/nvpair.h +++ b/include/sys/nvpair.h @@ -62,7 +62,7 @@ typedef enum { DATA_TYPE_UINT8, DATA_TYPE_BOOLEAN_ARRAY, DATA_TYPE_INT8_ARRAY, -#if !defined(_KERNEL) +#if !defined(_KERNEL) && !defined(_STANDALONE) DATA_TYPE_UINT8_ARRAY, DATA_TYPE_DOUBLE #else @@ -191,7 +191,7 @@ int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t); int nvlist_add_string_array(nvlist_t *, const char *, char *const *, uint_t); int nvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t); int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t); -#if !defined(_KERNEL) +#if !defined(_KERNEL) && !defined(_STANDALONE) int nvlist_add_double(nvlist_t *, const char *, double); #endif @@ -228,7 +228,7 @@ int nvlist_lookup_nvlist_array(nvlist_t *, const char *, nvlist_t ***, uint_t *); int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *); int nvlist_lookup_pairs(nvlist_t *, int, ...); -#if !defined(_KERNEL) +#if !defined(_KERNEL) && !defined(_STANDALONE) int nvlist_lookup_double(nvlist_t *, const char *, double *); #endif @@ -269,7 +269,7 @@ int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *); int nvpair_value_string_array(nvpair_t *, char ***, uint_t *); int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *); int nvpair_value_hrtime(nvpair_t *, hrtime_t *); -#if !defined(_KERNEL) +#if !defined(_KERNEL) && !defined(_STANDALONE) int nvpair_value_double(nvpair_t *, double *); #endif diff --git a/include/sys/pathname.h b/include/sys/pathname.h index d79cc5c01afd..52f21316c23d 100644 --- a/include/sys/pathname.h +++ b/include/sys/pathname.h @@ -54,10 +54,6 @@ extern "C" { */ typedef struct pathname { char *pn_buf; /* underlying storage */ -#if 0 /* unused in ZoL */ - char *pn_path; /* remaining pathname */ - size_t pn_pathlen; /* remaining length */ -#endif size_t pn_bufsize; /* total size of pn_buf */ } pathname_t; diff --git a/include/sys/spa.h b/include/sys/spa.h index ddce8cc914f8..045431c2096b 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -768,12 +768,12 @@ extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props, extern int spa_import(char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags); extern nvlist_t *spa_tryimport(nvlist_t *tryconfig); -extern int spa_destroy(char *pool); +extern int spa_destroy(const char *pool); extern int spa_checkpoint(const char *pool); extern int spa_checkpoint_discard(const char *pool); -extern int spa_export(char *pool, nvlist_t **oldconfig, boolean_t force, +extern int spa_export(const char *pool, nvlist_t **oldconfig, boolean_t force, boolean_t hardforce); -extern int spa_reset(char *pool); +extern int spa_reset(const char *pool); extern void spa_async_request(spa_t *spa, int flag); extern void spa_async_unrequest(spa_t *spa, int flag); extern void spa_async_suspend(spa_t *spa); diff --git a/include/sys/u8_textprep.h b/include/sys/u8_textprep.h index f8b5bed6e420..09ab13af268c 100644 --- a/include/sys/u8_textprep.h +++ b/include/sys/u8_textprep.h @@ -101,7 +101,7 @@ extern int uconv_u8tou32(const uchar_t *, size_t *, uint32_t *, size_t *, int); #define U8_ILLEGAL_CHAR (-1) #define U8_OUT_OF_RANGE_CHAR (-2) -extern int u8_validate(char *, size_t, char **, int, int *); +extern int u8_validate(const char *, size_t, char **, int, int *); extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *); extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t, int *); diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index d9f5ed580ef1..9f637036ee71 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -32,7 +32,15 @@ extern "C" { #endif -#ifdef __KERNEL__ +/* + * This code compiles in three different contexts. When __KERNEL__ is defined, + * the code uses "unix-like" kernel interfaces. When _STANDALONE is defined, the + * code is running in a reduced capacity environment of the boot loader which is + * generally a subset of both POSIX and kernel interfaces (with a few unique + * interfaces too). When neither are defined, it's in a userland POSIX or + * similar environment. + */ +#if defined(__KERNEL__) || defined(_STANDALONE) #include <sys/note.h> #include <sys/types.h> #include <sys/atomic.h> @@ -65,7 +73,7 @@ extern "C" { #include <sys/procfs_list.h> #include <sys/mod.h> #include <sys/zfs_context_os.h> -#else /* _KERNEL */ +#else /* _KERNEL || _STANDALONE */ #define _SYS_MUTEX_H #define _SYS_RWLOCK_H @@ -759,7 +767,7 @@ extern int kmem_cache_reap_active(void); #define __init #define __exit -#endif /* _KERNEL */ +#endif /* _KERNEL || _STANDALONE */ #ifdef __cplusplus }; diff --git a/include/sys/zfs_ioctl.h b/include/sys/zfs_ioctl.h index 53629cfc2c3f..afae576ea21a 100644 --- a/include/sys/zfs_ioctl.h +++ b/include/sys/zfs_ioctl.h @@ -68,6 +68,7 @@ extern "C" { */ #define ZFS_ACLTYPE_OFF 0 #define ZFS_ACLTYPE_POSIX 1 +#define ZFS_ACLTYPE_NFSV4 2 /* * Field manipulation macros for the drr_versioninfo field of the diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h index d7823221eb77..4138f6eba0a0 100644 --- a/include/sys/zfs_znode.h +++ b/include/sys/zfs_znode.h @@ -262,19 +262,20 @@ extern boolean_t zfs_get_vfs_flag_unmounted(objset_t *os); extern void zfs_znode_dmu_fini(znode_t *); extern void zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, znode_t *zp, char *name, vsecattr_t *, zfs_fuid_info_t *, - vattr_t *vap); + znode_t *dzp, znode_t *zp, const char *name, vsecattr_t *, + zfs_fuid_info_t *, vattr_t *vap); extern int zfs_log_create_txtype(zil_create_t, vsecattr_t *vsecp, vattr_t *vap); extern void zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, char *name, uint64_t foid, boolean_t unlinked); + znode_t *dzp, const char *name, uint64_t foid, boolean_t unlinked); #define ZFS_NO_OBJECT 0 /* no object id */ extern void zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, znode_t *zp, char *name); + znode_t *dzp, znode_t *zp, const char *name); extern void zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, znode_t *zp, char *name, char *link); + znode_t *dzp, znode_t *zp, const char *name, const char *link); extern void zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp); + znode_t *sdzp, const char *sname, znode_t *tdzp, const char *dname, + znode_t *szp); extern void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, offset_t off, ssize_t len, int ioflag, zil_callback_t callback, void *callback_data); diff --git a/include/sys/zil.h b/include/sys/zil.h index 7e61a13301c0..ec89de38d443 100644 --- a/include/sys/zil.h +++ b/include/sys/zil.h @@ -462,9 +462,9 @@ extern zil_stats_t zil_stats; #define ZIL_STAT_BUMP(stat) \ ZIL_STAT_INCR(stat, 1); -typedef int zil_parse_blk_func_t(zilog_t *zilog, blkptr_t *bp, void *arg, +typedef int zil_parse_blk_func_t(zilog_t *zilog, const blkptr_t *bp, void *arg, uint64_t txg); -typedef int zil_parse_lr_func_t(zilog_t *zilog, lr_t *lr, void *arg, +typedef int zil_parse_lr_func_t(zilog_t *zilog, const lr_t *lr, void *arg, uint64_t txg); typedef int zil_replay_func_t(void *arg1, void *arg2, boolean_t byteswap); typedef int zil_get_data_t(void *arg, lr_write_t *lr, char *dbuf, |