mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Changes to make openzfs build within FreeBSD buildworld
A collection of header changes to enable FreeBSD to build with vendored OpenZFS. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10635
This commit is contained in:
@@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/counter.h>
|
||||
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/freebsd_rwlock.h>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/spa.h>
|
||||
#include <sys/zio.h>
|
||||
#include <sys/spa_impl.h>
|
||||
#include <sys/counter.h>
|
||||
#include <sys/zio_compress.h>
|
||||
#include <sys/zio_checksum.h>
|
||||
#include <sys/zfs_context.h>
|
||||
@@ -47,6 +48,8 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <cityhash.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <sys/vm.h>
|
||||
#include <sys/vmmeter.h>
|
||||
|
||||
extern struct vfsops zfs_vfsops;
|
||||
|
||||
|
||||
@@ -142,8 +142,8 @@ zfsdev_ioctl(struct cdev *dev, ulong_t zcmd, caddr_t arg, int flag,
|
||||
zcl = NULL;
|
||||
|
||||
if (len != sizeof (zfs_iocparm_t)) {
|
||||
printf("len %d vecnum: %d sizeof (zfs_cmd_t) %lu\n",
|
||||
len, vecnum, sizeof (zfs_cmd_t));
|
||||
printf("len %d vecnum: %d sizeof (zfs_cmd_t) %ju\n",
|
||||
len, vecnum, (uintmax_t)sizeof (zfs_cmd_t));
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,11 +123,10 @@ SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache");
|
||||
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0,
|
||||
"ZFS VDEV mirror");
|
||||
|
||||
#ifdef ZFS_META_VERSION
|
||||
SYSCTL_DECL(_vfs_zfs_version);
|
||||
SYSCTL_CONST_STRING(_vfs_zfs_version, OID_AUTO, module, CTLFLAG_RD,
|
||||
(ZFS_META_VERSION "-" ZFS_META_RELEASE), "OpenZFS module version");
|
||||
#endif
|
||||
|
||||
extern arc_state_t ARC_anon;
|
||||
extern arc_state_t ARC_mru;
|
||||
extern arc_state_t ARC_mru_ghost;
|
||||
@@ -143,12 +142,12 @@ extern arc_state_t ARC_l2c_only;
|
||||
/* arc.c */
|
||||
|
||||
/* legacy compat */
|
||||
extern unsigned long l2arc_write_max; /* def max write size */
|
||||
extern unsigned long l2arc_write_boost; /* extra warmup write */
|
||||
extern unsigned long l2arc_headroom; /* # of dev writes */
|
||||
extern unsigned long l2arc_headroom_boost;
|
||||
extern unsigned long l2arc_feed_secs; /* interval seconds */
|
||||
extern unsigned long l2arc_feed_min_ms; /* min interval msecs */
|
||||
extern uint64_t l2arc_write_max; /* def max write size */
|
||||
extern uint64_t l2arc_write_boost; /* extra warmup write */
|
||||
extern uint64_t l2arc_headroom; /* # of dev writes */
|
||||
extern uint64_t l2arc_headroom_boost;
|
||||
extern uint64_t l2arc_feed_secs; /* interval seconds */
|
||||
extern uint64_t l2arc_feed_min_ms; /* min interval msecs */
|
||||
extern int l2arc_noprefetch; /* don't cache prefetch bufs */
|
||||
extern int l2arc_feed_again; /* turbo warmup */
|
||||
extern int l2arc_norw; /* no reads during writes */
|
||||
|
||||
@@ -31,15 +31,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/eventhandler.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/cmn_err.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/zfs_ioctl_compat.h>
|
||||
|
||||
enum zfs_ioc_legacy {
|
||||
|
||||
@@ -2157,6 +2157,13 @@ zfs_freevfs(vfs_t *vfsp)
|
||||
|
||||
#ifdef __i386__
|
||||
static int desiredvnodes_backup;
|
||||
#include <sys/vmmeter.h>
|
||||
|
||||
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_map.h>
|
||||
#endif
|
||||
|
||||
static void
|
||||
@@ -2321,8 +2328,8 @@ zfs_set_version(zfsvfs_t *zfsvfs, uint64_t newvers)
|
||||
}
|
||||
|
||||
spa_history_log_internal_ds(dmu_objset_ds(os), "upgrade", tx,
|
||||
"from %lu to %lu", zfsvfs->z_version, newvers);
|
||||
|
||||
"from %ju to %ju", (uintmax_t)zfsvfs->z_version,
|
||||
(uintmax_t)newvers);
|
||||
dmu_tx_commit(tx);
|
||||
|
||||
zfsvfs->z_version = newvers;
|
||||
|
||||
Reference in New Issue
Block a user