Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs/sys zfs: Expose h...
details: https://anonhg.NetBSD.org/src/rev/ff018e1fb6d1
branches: trunk
changeset: 1029259:ff018e1fb6d1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Dec 28 17:51:23 2021 +0000
description:
zfs: Expose hostid to zfs, as in gethostid/sethostid(3).
If set to nonzero, the hostid is recorded in the metadata of a zpool,
and checked by `zpool import' when the pool has not been explicitly
exported. After reboot, zpool import will not need `-f' to reimport
the pool.
Setting the hostid must be done explicitly through sysctl (or the
sethostid(3) library call) on all ports except acorn32, amiga,
mvme68k, newsmips, sparc, sparc64, sun2, and sun3. So for most users
this change will have no immediate effect. But you can obviate the
need for `zpool import -f' by adding `kern.hostid=123456789' to
/etc/sysctl.conf and importing the pool one last time with `-f'.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r e48aaeab6712 -r ff018e1fb6d1 external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h Tue Dec 28 17:45:56 2021 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_context.h Tue Dec 28 17:51:23 2021 +0000
@@ -130,6 +130,7 @@
#include <vm/vnode_pager.h>
#else /* !__NetBSD__ */
#include <sys/callout.h>
+#include <sys/kernel.h>
#include <sys/stdarg.h>
#include <miscfs/specfs/specdev.h>
@@ -165,7 +166,7 @@
#define td_ru l_ru
#define UID_NOBODY (32767)
#define vnode_pager_setsize(vp, size) zfs_netbsd_setsize(vp, size)
-#define zone_get_hostid(a) 0
+#define zone_get_hostid(a) ((unsigned)hostid)
extern struct utsname utsname;
Home |
Main Index |
Thread Index |
Old Index