diff options
author | Arvind Sankar <[email protected]> | 2020-06-11 16:38:25 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:21:32 -0700 |
commit | 0ce2de637bf73e2c7e483e644aa09797439734ef (patch) | |
tree | c4d45fff310b523f8fe44d8a7887348aafc5d27a /include | |
parent | 60356b1a211a0fcfe7dbd2e1dd280d6fc0170cf0 (diff) |
Add prototypes
Add prototypes/move prototypes to header files.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'include')
-rw-r--r-- | include/libzfs_impl.h | 1 | ||||
-rw-r--r-- | include/libzutil.h | 1 | ||||
-rw-r--r-- | include/os/freebsd/zfs/sys/vdev_os.h | 3 | ||||
-rw-r--r-- | include/os/freebsd/zfs/sys/zfs_vfsops.h | 3 | ||||
-rw-r--r-- | include/os/linux/spl/sys/trace.h | 31 | ||||
-rw-r--r-- | include/os/linux/zfs/sys/zfs_vfsops.h | 3 | ||||
-rw-r--r-- | include/sys/lua/luaconf.h | 1 | ||||
-rw-r--r-- | include/sys/vdev_raidz_impl.h | 2 | ||||
-rw-r--r-- | include/sys/zil.h | 1 |
9 files changed, 33 insertions, 13 deletions
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h index 78b5a0586..35b92f6d9 100644 --- a/include/libzfs_impl.h +++ b/include/libzfs_impl.h @@ -148,6 +148,7 @@ int no_memory(libzfs_handle_t *); int zfs_standard_error(libzfs_handle_t *, int, const char *); int zfs_standard_error_fmt(libzfs_handle_t *, int, const char *, ...); +void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *); int zpool_standard_error(libzfs_handle_t *, int, const char *); int zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...); diff --git a/include/libzutil.h b/include/libzutil.h index 98998e195..82a802678 100644 --- a/include/libzutil.h +++ b/include/libzutil.h @@ -136,6 +136,7 @@ extern void zfs_nicenum(uint64_t, char *, size_t); extern void zfs_nicenum_format(uint64_t, char *, size_t, enum zfs_nicenum_format); extern void zfs_nicetime(uint64_t, char *, size_t); +extern void zfs_niceraw(uint64_t, char *, size_t); #define nicenum(num, buf, size) zfs_nicenum(num, buf, size) diff --git a/include/os/freebsd/zfs/sys/vdev_os.h b/include/os/freebsd/zfs/sys/vdev_os.h index e2780fdbb..59da954b9 100644 --- a/include/os/freebsd/zfs/sys/vdev_os.h +++ b/include/os/freebsd/zfs/sys/vdev_os.h @@ -27,4 +27,7 @@ #define _SYS_VDEV_OS_H extern int vdev_label_write_pad2(vdev_t *vd, const char *buf, size_t size); +extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs, + uint64_t *count); + #endif diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops.h b/include/os/freebsd/zfs/sys/zfs_vfsops.h index 26652004b..70ada204a 100644 --- a/include/os/freebsd/zfs/sys/zfs_vfsops.h +++ b/include/os/freebsd/zfs/sys/zfs_vfsops.h @@ -153,6 +153,9 @@ typedef struct zfid_long { extern uint_t zfs_fsyncer_key; extern int zfs_super_owner; +extern void zfs_init(void); +extern void zfs_fini(void); + extern int zfs_suspend_fs(zfsvfs_t *zfsvfs); extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); extern int zfs_end_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); diff --git a/include/os/linux/spl/sys/trace.h b/include/os/linux/spl/sys/trace.h index 55c587358..b148ace6a 100644 --- a/include/os/linux/spl/sys/trace.h +++ b/include/os/linux/spl/sys/trace.h @@ -104,27 +104,45 @@ trace_zfs_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \ (uintptr_t)(arg3), (uintptr_t)(arg4)) +#define PROTO_DTRACE_PROBE(name) \ + noinline void trace_zfs_##name(void) +#define PROTO_DTRACE_PROBE1(name) \ + noinline void trace_zfs_##name(uintptr_t) +#define PROTO_DTRACE_PROBE2(name) \ + noinline void trace_zfs_##name(uintptr_t, uintptr_t) +#define PROTO_DTRACE_PROBE3(name) \ + noinline void trace_zfs_##name(uintptr_t, uintptr_t, \ + uintptr_t) +#define PROTO_DTRACE_PROBE4(name) \ + noinline void trace_zfs_##name(uintptr_t, uintptr_t, \ + uintptr_t, uintptr_t) + #if defined(CREATE_TRACE_POINTS) #define FUNC_DTRACE_PROBE(name) \ +PROTO_DTRACE_PROBE(name); \ noinline void trace_zfs_##name(void) { } \ EXPORT_SYMBOL(trace_zfs_##name) #define FUNC_DTRACE_PROBE1(name) \ +PROTO_DTRACE_PROBE1(name); \ noinline void trace_zfs_##name(uintptr_t arg1) { } \ EXPORT_SYMBOL(trace_zfs_##name) #define FUNC_DTRACE_PROBE2(name) \ +PROTO_DTRACE_PROBE2(name); \ noinline void trace_zfs_##name(uintptr_t arg1, \ uintptr_t arg2) { } \ EXPORT_SYMBOL(trace_zfs_##name) #define FUNC_DTRACE_PROBE3(name) \ +PROTO_DTRACE_PROBE3(name); \ noinline void trace_zfs_##name(uintptr_t arg1, \ uintptr_t arg2, uintptr_t arg3) { } \ EXPORT_SYMBOL(trace_zfs_##name) #define FUNC_DTRACE_PROBE4(name) \ +PROTO_DTRACE_PROBE4(name); \ noinline void trace_zfs_##name(uintptr_t arg1, \ uintptr_t arg2, uintptr_t arg3, uintptr_t arg4) { } \ EXPORT_SYMBOL(trace_zfs_##name) @@ -146,19 +164,6 @@ EXPORT_SYMBOL(trace_zfs_##name) #else /* CREATE_TRACE_POINTS */ -#define PROTO_DTRACE_PROBE(name) \ - noinline void trace_zfs_##name(void) -#define PROTO_DTRACE_PROBE1(name) \ - noinline void trace_zfs_##name(uintptr_t) -#define PROTO_DTRACE_PROBE2(name) \ - noinline void trace_zfs_##name(uintptr_t, uintptr_t) -#define PROTO_DTRACE_PROBE3(name) \ - noinline void trace_zfs_##name(uintptr_t, uintptr_t, \ - uintptr_t) -#define PROTO_DTRACE_PROBE4(name) \ - noinline void trace_zfs_##name(uintptr_t, uintptr_t, \ - uintptr_t, uintptr_t) - #define DEFINE_DTRACE_PROBE(name) PROTO_DTRACE_PROBE(name) #define DEFINE_DTRACE_PROBE1(name) PROTO_DTRACE_PROBE1(name) #define DEFINE_DTRACE_PROBE2(name) PROTO_DTRACE_PROBE2(name) diff --git a/include/os/linux/zfs/sys/zfs_vfsops.h b/include/os/linux/zfs/sys/zfs_vfsops.h index 4e60a081a..24a0a2e6a 100644 --- a/include/os/linux/zfs/sys/zfs_vfsops.h +++ b/include/os/linux/zfs/sys/zfs_vfsops.h @@ -195,6 +195,9 @@ typedef struct zfid_long { #define SHORT_FID_LEN (sizeof (zfid_short_t) - sizeof (uint16_t)) #define LONG_FID_LEN (sizeof (zfid_long_t) - sizeof (uint16_t)) +extern void zfs_init(void); +extern void zfs_fini(void); + extern int zfs_suspend_fs(zfsvfs_t *zfsvfs); extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); extern int zfs_end_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); diff --git a/include/sys/lua/luaconf.h b/include/sys/lua/luaconf.h index fa7861336..ce99f339f 100644 --- a/include/sys/lua/luaconf.h +++ b/include/sys/lua/luaconf.h @@ -15,6 +15,7 @@ extern ssize_t lcompat_sprintf(char *, size_t size, const char *, ...); extern int64_t lcompat_strtoll(const char *, char **); extern int64_t lcompat_pow(int64_t, int64_t); +extern int lcompat_hashnum(int64_t); /* ** ================================================================== diff --git a/include/sys/vdev_raidz_impl.h b/include/sys/vdev_raidz_impl.h index 81a321ee5..8492daedb 100644 --- a/include/sys/vdev_raidz_impl.h +++ b/include/sys/vdev_raidz_impl.h @@ -133,6 +133,8 @@ typedef struct raidz_map { #define RAIDZ_ORIGINAL_IMPL (INT_MAX) extern const raidz_impl_ops_t vdev_raidz_scalar_impl; +extern boolean_t raidz_will_scalar_work(void); + #if defined(__x86_64) && defined(HAVE_SSE2) /* only x86_64 for now */ extern const raidz_impl_ops_t vdev_raidz_sse2_impl; #endif diff --git a/include/sys/zil.h b/include/sys/zil.h index 716b19e56..7e61a1330 100644 --- a/include/sys/zil.h +++ b/include/sys/zil.h @@ -496,6 +496,7 @@ extern void zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx); extern void zil_async_to_sync(zilog_t *zilog, uint64_t oid); extern void zil_commit(zilog_t *zilog, uint64_t oid); extern void zil_commit_impl(zilog_t *zilog, uint64_t oid); +extern void zil_remove_async(zilog_t *zilog, uint64_t oid); extern int zil_reset(const char *osname, void *txarg); extern int zil_claim(struct dsl_pool *dp, |