aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2020-10-01 23:09:24 +0000
committerMatt Macy <mmacy@FreeBSD.org>2020-10-01 23:09:24 +0000
commite2228bd99047bb6a0cef0da931147b1f28f155c2 (patch)
tree2859f65ec0723fe7424b97206b84c5d760d12b1c /include
parent01ea34f1d8bc20a76845a15e968388679693ee44 (diff)
downloadsrc-e2228bd99047bb6a0cef0da931147b1f28f155c2.tar.gz
src-e2228bd99047bb6a0cef0da931147b1f28f155c2.zip
Update OpenZFS to 2.0.0-rc3-gfc5966vendor/openzfs/2.0-rc3-gfc5966
Notes
Notes: svn path=/vendor-sys/openzfs/dist/; revision=366348 svn path=/vendor-sys/openzfs/2.0-rc3-gfc5966/; revision=366349; tag=vendor/openzfs/2.0-rc3-gfc5966
Diffstat (limited to 'include')
-rw-r--r--include/os/freebsd/spl/sys/kstat.h18
-rw-r--r--include/os/freebsd/spl/sys/procfs_list.h13
-rw-r--r--include/os/freebsd/spl/sys/simd_x86.h16
-rw-r--r--include/os/linux/spl/sys/procfs_list.h1
-rw-r--r--include/sys/frame.h3
-rw-r--r--include/sys/lua/luaconf.h4
-rw-r--r--include/sys/zfs_context.h1
-rw-r--r--include/sys/zstd/zstd.h1
8 files changed, 39 insertions, 18 deletions
diff --git a/include/os/freebsd/spl/sys/kstat.h b/include/os/freebsd/spl/sys/kstat.h
index 74c3da8ec376..5ceb88b297d9 100644
--- a/include/os/freebsd/spl/sys/kstat.h
+++ b/include/os/freebsd/spl/sys/kstat.h
@@ -83,6 +83,14 @@ typedef struct kstat_s kstat_t;
typedef int kid_t; /* unique kstat id */
typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */
+struct seq_file {
+ char *sf_buf;
+ size_t sf_size;
+};
+
+void seq_printf(struct seq_file *m, const char *fmt, ...);
+
+
typedef struct kstat_module {
char ksm_name[KSTAT_STRLEN+1]; /* module name */
struct list_head ksm_module_list; /* module linkage */
@@ -92,6 +100,7 @@ typedef struct kstat_module {
typedef struct kstat_raw_ops {
int (*headers)(char *buf, size_t size);
+ int (*seq_headers)(struct seq_file *);
int (*data)(char *buf, size_t size, void *data);
void *(*addr)(kstat_t *ksp, loff_t index);
} kstat_raw_ops_t;
@@ -112,6 +121,7 @@ struct kstat_s {
size_t ks_data_size; /* size of kstat data section */
kstat_update_t *ks_update; /* dynamic updates */
void *ks_private; /* private data */
+ void *ks_private1; /* private data */
kmutex_t ks_private_lock; /* kstat private data lock */
kmutex_t *ks_lock; /* kstat data lock */
struct list_head ks_list; /* kstat linkage */
@@ -185,6 +195,12 @@ extern void __kstat_set_raw_ops(kstat_t *ksp,
int (*data)(char *buf, size_t size, void *data),
void* (*addr)(kstat_t *ksp, loff_t index));
+extern void __kstat_set_seq_raw_ops(kstat_t *ksp,
+ int (*headers)(struct seq_file *),
+ int (*data)(char *buf, size_t size, void *data),
+ void* (*addr)(kstat_t *ksp, loff_t index));
+
+
extern kstat_t *__kstat_create(const char *ks_module, int ks_instance,
const char *ks_name, const char *ks_class, uchar_t ks_type,
uint_t ks_ndata, uchar_t ks_flags);
@@ -196,6 +212,8 @@ extern void kstat_waitq_exit(kstat_io_t *);
extern void kstat_runq_enter(kstat_io_t *);
extern void kstat_runq_exit(kstat_io_t *);
+#define kstat_set_seq_raw_ops(k, h, d, a) \
+ __kstat_set_seq_raw_ops(k, h, d, a)
#define kstat_set_raw_ops(k, h, d, a) \
__kstat_set_raw_ops(k, h, d, a)
#define kstat_create(m, i, n, c, t, s, f) \
diff --git a/include/os/freebsd/spl/sys/procfs_list.h b/include/os/freebsd/spl/sys/procfs_list.h
index 5d623c369c4c..da13f0387cb5 100644
--- a/include/os/freebsd/spl/sys/procfs_list.h
+++ b/include/os/freebsd/spl/sys/procfs_list.h
@@ -33,16 +33,18 @@
* procfs list manipulation
*/
-struct seq_file { };
-void seq_printf(struct seq_file *m, const char *fmt, ...);
-
-typedef struct procfs_list {
+typedef struct procfs_list procfs_list_t;
+struct procfs_list {
void *pl_private;
+ void *pl_next_data;
kmutex_t pl_lock;
list_t pl_list;
uint64_t pl_next_id;
+ int (*pl_show)(struct seq_file *f, void *p);
+ int (*pl_show_header)(struct seq_file *f);
+ int (*pl_clear)(procfs_list_t *procfs_list);
size_t pl_node_offset;
-} procfs_list_t;
+};
typedef struct procfs_list_node {
list_node_t pln_link;
@@ -50,6 +52,7 @@ typedef struct procfs_list_node {
} procfs_list_node_t;
void procfs_list_install(const char *module,
+ const char *submodule,
const char *name,
mode_t mode,
procfs_list_t *procfs_list,
diff --git a/include/os/freebsd/spl/sys/simd_x86.h b/include/os/freebsd/spl/sys/simd_x86.h
index a35e205d5a3b..63d6017b79e0 100644
--- a/include/os/freebsd/spl/sys/simd_x86.h
+++ b/include/os/freebsd/spl/sys/simd_x86.h
@@ -29,6 +29,7 @@
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/systm.h>
+#include <sys/proc.h>
#ifdef __i386__
#include <x86/fpu.h>
#else
@@ -42,16 +43,15 @@
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
-#define kfpu_begin() { \
- critical_enter(); \
- fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); \
+#define kfpu_begin() { \
+ if (__predict_false(!is_fpu_kern_thread(0))) \
+ fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX);\
}
-#define kfpu_end() \
- { \
- fpu_kern_leave(curthread, NULL); \
- critical_exit(); \
- }
+#define kfpu_end() { \
+ if (__predict_false(curpcb->pcb_flags & PCB_FPUNOSAVE)) \
+ fpu_kern_leave(curthread, NULL); \
+}
/*
* Check if OS supports AVX and AVX2 by checking XCR0
diff --git a/include/os/linux/spl/sys/procfs_list.h b/include/os/linux/spl/sys/procfs_list.h
index eb1519c0ad63..9bb437f55cf7 100644
--- a/include/os/linux/spl/sys/procfs_list.h
+++ b/include/os/linux/spl/sys/procfs_list.h
@@ -57,6 +57,7 @@ typedef struct procfs_list_node {
} procfs_list_node_t;
void procfs_list_install(const char *module,
+ const char *submodule,
const char *name,
mode_t mode,
procfs_list_t *procfs_list,
diff --git a/include/sys/frame.h b/include/sys/frame.h
index 2865dbb57dc3..b6bbaa79b2f8 100644
--- a/include/sys/frame.h
+++ b/include/sys/frame.h
@@ -23,7 +23,8 @@
extern "C" {
#endif
-#if defined(__KERNEL__) && defined(HAVE_STACK_FRAME_NON_STANDARD)
+#if defined(__KERNEL__) && defined(HAVE_KERNEL_OBJTOOL) && \
+ defined(HAVE_STACK_FRAME_NON_STANDARD)
#include <linux/frame.h>
#else
#define STACK_FRAME_NON_STANDARD(func)
diff --git a/include/sys/lua/luaconf.h b/include/sys/lua/luaconf.h
index ce99f339fe34..83202d71c27b 100644
--- a/include/sys/lua/luaconf.h
+++ b/include/sys/lua/luaconf.h
@@ -368,11 +368,7 @@ extern int lcompat_hashnum(int64_t);
@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system.
** CHANGE it if it uses too much C-stack space.
*/
-#ifdef __linux__
#define LUAL_BUFFERSIZE 512
-#else
-#define LUAL_BUFFERSIZE 1024
-#endif
/*
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index e33f52c176a8..d9f5ed580ef1 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -386,6 +386,7 @@ typedef struct procfs_list_node {
} procfs_list_node_t;
void procfs_list_install(const char *module,
+ const char *submodule,
const char *name,
mode_t mode,
procfs_list_t *procfs_list,
diff --git a/include/sys/zstd/zstd.h b/include/sys/zstd/zstd.h
index f965df31988c..e42e44c236ab 100644
--- a/include/sys/zstd/zstd.h
+++ b/include/sys/zstd/zstd.h
@@ -90,6 +90,7 @@ int zfs_zstd_decompress_level(void *s_start, void *d_start, size_t s_len,
size_t d_len, uint8_t *level);
int zfs_zstd_decompress(void *s_start, void *d_start, size_t s_len,
size_t d_len, int n);
+void zfs_zstd_cache_reap_now(void);
#ifdef __cplusplus
}