Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
0be36012
Commit
0be36012
authored
Oct 17, 2020
by
Matt Macy
Browse files
Update OpenZFS to 2.0.0-rc3-gbd565f
parent
e2228bd9
Changes
217
Hide whitespace changes
Inline
Side-by-side
include/os/freebsd/spl/sys/kmem.h
View file @
0be36012
...
...
@@ -29,6 +29,7 @@
#ifndef _OPENSOLARIS_SYS_KMEM_H_
#define _OPENSOLARIS_SYS_KMEM_H_
#ifdef _KERNEL
#include
<sys/param.h>
#include
<sys/malloc.h>
#include
<sys/vmem.h>
...
...
@@ -93,5 +94,14 @@ void *calloc(size_t n, size_t s);
zfs_kmem_alloc((size), (kmflags) | M_ZERO)
#define kmem_free(buf, size) zfs_kmem_free((buf), (size))
#endif
/* _KERNEL */
#ifdef _STANDALONE
/*
* At the moment, we just need it for the type. We redirect the alloc/free
* routines to the usual Free and Malloc in that environment.
*/
typedef
int
kmem_cache_t
;
#endif
/* _STANDALONE */
#endif
/* _OPENSOLARIS_SYS_KMEM_H_ */
include/os/freebsd/spl/sys/kmem_cache.h
View file @
0be36012
...
...
@@ -30,6 +30,7 @@
#ifndef _SPL_KMEM_CACHE_H
#define _SPL_KMEM_CACHE_H
#ifdef _KERNEL
#include
<sys/taskq.h>
/* kmem move callback return values */
...
...
@@ -46,4 +47,6 @@ extern void spl_kmem_cache_set_move(kmem_cache_t *,
#define kmem_cache_set_move(skc, move) spl_kmem_cache_set_move(skc, move)
#endif
/* _KERNEL */
#endif
include/os/freebsd/spl/sys/kstat.h
View file @
0be36012
...
...
@@ -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
...
...
@@ -24,8 +23,11 @@
#ifndef _SPL_KSTAT_H
#define _SPL_KSTAT_H
#include
<sys/types.h>
#ifndef _STANDALONE
#include
<sys/sysctl.h>
#endif
struct
list_head
{};
#include
<sys/mutex.h>
#include
<sys/proc.h>
...
...
@@ -129,9 +131,10 @@ struct kstat_s {
kstat_raw_ops_t
ks_raw_ops
;
/* ops table for raw type */
char
*
ks_raw_buf
;
/* buf used for raw ops */
size_t
ks_raw_bufsize
;
/* size of raw ops buffer */
#ifndef _STANDALONE
struct
sysctl_ctx_list
ks_sysctl_ctx
;
struct
sysctl_oid
*
ks_sysctl_root
;
#endif
/* _STANDALONE */
};
typedef
struct
kstat_named_s
{
...
...
@@ -216,10 +219,16 @@ extern void kstat_runq_exit(kstat_io_t *);
__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)
#ifndef _STANDALONE
#define kstat_create(m, i, n, c, t, s, f) \
__kstat_create(m, i, n, c, t, s, f)
#define kstat_install(k) __kstat_install(k)
#define kstat_delete(k) __kstat_delete(k)
#else
#define kstat_create(m, i, n, c, t, s, f) ((kstat_t *)0)
#define kstat_install(k)
#define kstat_delete(k)
#endif
#endif
/* _SPL_KSTAT_H */
include/os/freebsd/spl/sys/proc.h
View file @
0be36012
...
...
@@ -41,7 +41,7 @@
#include
<sys/kmem.h>
#include
<sys/malloc.h>
#ifdef _KERNEL
#define CPU curcpu
#define minclsyspri PRIBIO
#define defclsyspri minclsyspri
...
...
@@ -111,4 +111,5 @@ zfs_proc_is_caller(proc_t *p)
return
(
p
==
curproc
);
}
#endif
/* _KERNEL */
#endif
/* _OPENSOLARIS_SYS_PROC_H_ */
include/os/freebsd/spl/sys/procfs_list.h
View file @
0be36012
...
...
@@ -25,6 +25,8 @@
#ifndef _SPL_PROCFS_LIST_H
#define _SPL_PROCFS_LIST_H
#ifndef _STANDALONE
#include
<sys/kstat.h>
#include
<sys/mutex.h>
...
...
@@ -64,4 +66,8 @@ void procfs_list_uninstall(procfs_list_t *procfs_list);
void
procfs_list_destroy
(
procfs_list_t
*
procfs_list
);
void
procfs_list_add
(
procfs_list_t
*
procfs_list
,
void
*
p
);
#else
typedef
int
procfs_list_t
;
#endif
/* !_STANDALONE */
#endif
/* _SPL_PROCFS_LIST_H */
include/os/freebsd/spl/sys/sig.h
View file @
0be36012
...
...
@@ -29,6 +29,8 @@
#ifndef _OPENSOLARIS_SYS_SIG_H_
#define _OPENSOLARIS_SYS_SIG_H_
#ifndef _STANDALONE
#include_next <sys/signal.h>
#include
<sys/param.h>
#include
<sys/lock.h>
...
...
@@ -62,4 +64,7 @@ issig(int why)
}
return
(
0
);
}
#endif
/* !_STANDALONE */
#endif
/* _OPENSOLARIS_SYS_SIG_H_ */
include/os/freebsd/spl/sys/simd_x86.h
View file @
0be36012
...
...
@@ -26,15 +26,12 @@
* $FreeBSD$
*/
#include
<sys/cdefs.h>
#include
<sys/types.h>
#include
<sys/
systm
.h>
#include
<sys/
cdefs
.h>
#include
<sys/proc.h>
#ifdef __i386__
#include
<x86/fpu.h>
#else
#include
<machine/fpu.h>
#endif
#include
<sys/systm.h>
#include
<machine/pcb.h>
#include
<x86/x86_var.h>
#include
<x86/specialreg.h>
...
...
include/os/freebsd/spl/sys/sunddi.h
View file @
0be36012
...
...
@@ -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
...
...
include/os/freebsd/spl/sys/sysmacros.h
View file @
0be36012
...
...
@@ -31,6 +31,7 @@
#define _SYS_SYSMACROS_H
#include
<sys/param.h>
#include
<sys/systm.h>
#include
<sys/isa_defs.h>
#include
<sys/libkern.h>
#include
<sys/zone.h>
...
...
@@ -71,7 +72,11 @@ extern "C" {
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#endif
#ifdef _STANDALONE
#define boot_ncpus 1
#else
/* _STANDALONE */
#define boot_ncpus mp_ncpus
#endif
/* _STANDALONE */
#define kpreempt_disable() critical_enter()
#define kpreempt_enable() critical_exit()
#define CPU_SEQID curcpu
...
...
@@ -319,7 +324,7 @@ extern unsigned char bcd_to_byte[256];
/* avoid any possibility of clashing with <stddef.h> version */
#define offsetof(
s, m) ((size_t)(&(((s *)0)->m))
)
#define offsetof(
type, field) __offsetof(type, field
)
#endif
/*
...
...
include/os/freebsd/spl/sys/taskq.h
View file @
0be36012
...
...
@@ -26,6 +26,8 @@
#ifndef _SYS_TASKQ_H
#define _SYS_TASKQ_H
#ifdef _KERNEL
#include
<sys/types.h>
#include
<sys/proc.h>
#include
<sys/taskqueue.h>
...
...
@@ -112,4 +114,11 @@ void taskq_resume(taskq_t *);
}
#endif
#endif
/* _KERNEL */
#ifdef _STANDALONE
typedef
int
taskq_ent_t
;
#define taskq_init_ent(x)
#endif
/* _STANDALONE */
#endif
/* _SYS_TASKQ_H */
include/os/freebsd/spl/sys/uio.h
View file @
0be36012
...
...
@@ -29,6 +29,8 @@
#ifndef _OPENSOLARIS_SYS_UIO_H_
#define _OPENSOLARIS_SYS_UIO_H_
#ifndef _STANDALONE
#include_next <sys/uio.h>
#include
<sys/_uio.h>
#include
<sys/debug.h>
...
...
@@ -107,4 +109,6 @@ uio_index_at_offset(uio_t *uio, offset_t off, uint_t *vec_idx)
return
(
off
);
}
#endif
/* !_STANDALONE */
#endif
/* !_OPENSOLARIS_SYS_UIO_H_ */
include/os/freebsd/zfs/sys/zfs_ctldir.h
View file @
0be36012
...
...
@@ -48,7 +48,7 @@ int zfsctl_root(zfsvfs_t *, int, vnode_t **);
void
zfsctl_init
(
void
);
void
zfsctl_fini
(
void
);
boolean_t
zfsctl_is_node
(
vnode_t
*
);
int
zfsctl_snapshot_unmount
(
char
*
snapname
,
int
flags
);
int
zfsctl_snapshot_unmount
(
const
char
*
snapname
,
int
flags
);
int
zfsctl_rename_snapshot
(
const
char
*
from
,
const
char
*
to
);
int
zfsctl_destroy_snapshot
(
const
char
*
snapname
,
int
force
);
int
zfsctl_umount_snapshots
(
vfs_t
*
,
int
,
cred_t
*
);
...
...
include/os/freebsd/zfs/sys/zfs_dir.h
View file @
0be36012
...
...
@@ -52,11 +52,7 @@ extern int zfs_dirent_lookup(znode_t *, const char *, znode_t **, int);
extern
int
zfs_link_create
(
znode_t
*
,
const
char
*
,
znode_t
*
,
dmu_tx_t
*
,
int
);
extern
int
zfs_link_destroy
(
znode_t
*
,
const
char
*
,
znode_t
*
,
dmu_tx_t
*
,
int
,
boolean_t
*
);
#if 0
extern int zfs_dirlook(vnode_t *, const char *, vnode_t **, int);
#else
extern
int
zfs_dirlook
(
znode_t
*
,
const
char
*
name
,
znode_t
**
);
#endif
extern
void
zfs_mknode
(
znode_t
*
,
vattr_t
*
,
dmu_tx_t
*
,
cred_t
*
,
uint_t
,
znode_t
**
,
zfs_acl_ids_t
*
);
extern
void
zfs_rmnode
(
znode_t
*
);
...
...
include/os/freebsd/zfs/sys/zfs_vfsops_os.h
View file @
0be36012
...
...
@@ -72,6 +72,7 @@ struct zfsvfs {
boolean_t
z_fuid_dirty
;
/* need to sync fuid table ? */
struct
zfs_fuid_info
*
z_fuid_replay
;
/* fuid info for replay */
zilog_t
*
z_log
;
/* intent log pointer */
uint_t
z_acl_type
;
/* type of acl usable on this fs */
uint_t
z_acl_mode
;
/* acl chmod/mode behavior */
uint_t
z_acl_inherit
;
/* acl inheritance behavior */
zfs_case_t
z_case
;
/* case-sense */
...
...
include/os/freebsd/zfs/sys/zfs_vnops.h
View file @
0be36012
...
...
@@ -32,21 +32,21 @@ int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
uint64_t
size
,
struct
vm_page
**
ppa
,
dmu_tx_t
*
tx
);
int
dmu_read_pages
(
objset_t
*
os
,
uint64_t
object
,
vm_page_t
*
ma
,
int
count
,
int
*
rbehind
,
int
*
rahead
,
int
last_size
);
extern
int
zfs_remove
(
znode_t
*
dzp
,
char
*
name
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_mkdir
(
znode_t
*
dzp
,
char
*
dirname
,
vattr_t
*
vap
,
extern
int
zfs_remove
(
znode_t
*
dzp
,
const
char
*
name
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_mkdir
(
znode_t
*
dzp
,
const
char
*
dirname
,
vattr_t
*
vap
,
znode_t
**
zpp
,
cred_t
*
cr
,
int
flags
,
vsecattr_t
*
vsecp
);
extern
int
zfs_rmdir
(
znode_t
*
dzp
,
char
*
name
,
znode_t
*
cwd
,
extern
int
zfs_rmdir
(
znode_t
*
dzp
,
const
char
*
name
,
znode_t
*
cwd
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_setattr
(
znode_t
*
zp
,
vattr_t
*
vap
,
int
flag
,
cred_t
*
cr
);
extern
int
zfs_rename
(
znode_t
*
sdzp
,
char
*
snm
,
znode_t
*
tdzp
,
char
*
tnm
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_rename
(
znode_t
*
sdzp
,
const
char
*
snm
,
znode_t
*
tdzp
,
const
char
*
tnm
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_symlink
(
znode_t
*
dzp
,
const
char
*
name
,
vattr_t
*
vap
,
const
char
*
link
,
znode_t
**
zpp
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_link
(
znode_t
*
tdzp
,
znode_t
*
sp
,
char
*
name
,
cred_t
*
cr
,
int
flags
);
const
char
*
name
,
cred_t
*
cr
,
int
flags
);
extern
int
zfs_space
(
znode_t
*
zp
,
int
cmd
,
struct
flock
*
bfp
,
int
flag
,
offset_t
offset
,
cred_t
*
cr
);
extern
int
zfs_create
(
znode_t
*
dzp
,
char
*
name
,
vattr_t
*
vap
,
int
excl
,
extern
int
zfs_create
(
znode_t
*
dzp
,
const
char
*
name
,
vattr_t
*
vap
,
int
excl
,
int
mode
,
znode_t
**
zpp
,
cred_t
*
cr
,
int
flag
,
vsecattr_t
*
vsecp
);
extern
int
zfs_setsecattr
(
znode_t
*
zp
,
vsecattr_t
*
vsecp
,
int
flag
,
cred_t
*
cr
);
...
...
include/os/linux/spl/rpc/xdr.h
View file @
0be36012
...
...
@@ -3,7 +3,6 @@
* Written by Ricardo Correia <Ricardo.M.Correia@Sun.COM>
*
* 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
...
...
include/os/linux/spl/sys/acl.h
View file @
0be36012
...
...
@@ -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
...
...
include/os/linux/spl/sys/atomic.h
View file @
0be36012
...
...
@@ -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
...
...
include/os/linux/spl/sys/byteorder.h
View file @
0be36012
...
...
@@ -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
...
...
include/os/linux/spl/sys/callb.h
View file @
0be36012
...
...
@@ -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
...
...
Prev
1
2
3
4
5
6
7
…
11
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment