From b5af61b569613885e94d6962b7faf1f75a21aa03 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 19 Oct 2025 13:09:34 +1100 Subject: [PATCH] libspl: move zone definitions from zfs_context.h Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #17861 --- include/sys/zfs_context.h | 6 +----- lib/libspl/include/sys/zone.h | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index bec036db5..d8c544663 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -113,6 +113,7 @@ extern "C" { #include #include #include +#include #include #include @@ -211,10 +212,6 @@ typedef off_t loff_t; extern int highbit64(uint64_t i); extern int lowbit64(uint64_t i); -#define zone_dataset_visible(x, y) (1) -#define INGLOBALZONE(z) (1) -extern uint32_t zone_get_hostid(void *zonep); - /* * Hostname information */ @@ -236,7 +233,6 @@ extern int zfs_secpolicy_rename_perms(const char *from, const char *to, cred_t *cr); extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr); extern int secpolicy_zfs(const cred_t *cr); -extern zoneid_t getzoneid(void); #define DDI_SLEEP KM_SLEEP #define ddi_log_sysevent(_a, _b, _c, _d, _e, _f, _g) \ diff --git a/lib/libspl/include/sys/zone.h b/lib/libspl/include/sys/zone.h index f4037b487..179cc004f 100644 --- a/lib/libspl/include/sys/zone.h +++ b/lib/libspl/include/sys/zone.h @@ -21,11 +21,19 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ -#ifndef _LIBSPL_SYS_ZONE_H -#define _LIBSPL_SYS_ZONE_H +#ifndef _SYS_ZONE_H +#define _SYS_ZONE_H -#endif +#define zone_dataset_visible(x, y) (1) + +#define INGLOBALZONE(z) (1) + +extern uint32_t zone_get_hostid(void *zonep); + +#endif /* _SYS_ZONE_H */