Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src Pull up following revision(s) (requested by riastradh in ...
details: https://anonhg.NetBSD.org/src/rev/cdcb696c625a
branches: netbsd-9
changeset: 745233:cdcb696c625a
user: martin <martin%NetBSD.org@localhost>
date: Tue Feb 25 20:03:12 2020 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #725):
etc/rc.d/mountall: revision 1.12
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.59
external/cddl/osnet/sys/kern/misc.c: revision 1.8
external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c: revision 1.5
external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c: revision 1.6
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.60
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.61
Define VOP_STRATEGY on zfs device nodes too.
Fixes eternal hangs in attempts to do I/O on device nodes on zfs.
XXX pullup
Teach zfs spec nodes to VOP_BWRITE too.
Fixes hang on writing to, e.g., ffs mounted on a device node that
lives on zfs.
XXX pullup
Teach device nodes on zfs to handle fsync by calling spec_fsync too.
If zfs=YES, unconditioally do zfs mount/unmount -a.
If you set zfs=YES, presumably you positively want the automatic rc.d
actions, so if there's no /sbin/zfs or if zfs can't find pools with
/etc/zfs/zpool.cache, presumably you would like feedback about that
in rc.log.
Report the OS name and release appropriately for NetBSD.
We are not OpenSolaris or uts!
Mark previous #ifdef __NetBSD__, per request from hannken.
diffstat:
etc/rc.d/mountall | 6 ++--
external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c | 8 +++++++
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 17 +++++++++++++++-
external/cddl/osnet/sys/kern/misc.c | 4 +-
4 files changed, 29 insertions(+), 6 deletions(-)
diffs (109 lines):
diff -r 259cad249918 -r cdcb696c625a etc/rc.d/mountall
--- a/etc/rc.d/mountall Tue Feb 25 19:25:19 2020 +0000
+++ b/etc/rc.d/mountall Tue Feb 25 20:03:12 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mountall,v 1.10.4.1 2019/09/27 09:18:37 martin Exp $
+# $NetBSD: mountall,v 1.10.4.2 2020/02/25 20:03:12 martin Exp $
#
# REQUIRE: mountcritremote named ypbind
@@ -17,7 +17,7 @@
echo 'Mounting all file systems...'
# Mount file systems noted in fstab.
mount -a
- if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
+ if checkyesno zfs; then
# Mount ZFS file systems.
zfs mount -a
fi
@@ -26,7 +26,7 @@
mountall_stop()
{
echo 'Unmounting all file systems...'
- if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then
+ if checkyesno zfs; then
# Unmount ZFS file systems.
zfs unmount -a
fi
diff -r 259cad249918 -r cdcb696c625a external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c Tue Feb 25 19:25:19 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c Tue Feb 25 20:03:12 2020 +0000
@@ -540,9 +540,17 @@
void
spa_history_log_version(spa_t *spa, const char *operation)
{
+#ifdef __NetBSD__
+ spa_history_log_internal(spa, operation, NULL,
+ "pool version %llu; software version %llu/%d; %s %s %s %s %s",
+ (u_longlong_t)spa_version(spa), SPA_VERSION, ZPL_VERSION,
+ utsname.sysname, utsname.nodename, utsname.release, utsname.version,
+ utsname.machine);
+#else
spa_history_log_internal(spa, operation, NULL,
"pool version %llu; software version %llu/%d; uts %s %s %s %s",
(u_longlong_t)spa_version(spa), SPA_VERSION, ZPL_VERSION,
utsname.nodename, utsname.release, utsname.version,
utsname.machine);
+#endif
}
diff -r 259cad249918 -r cdcb696c625a external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Feb 25 19:25:19 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Tue Feb 25 20:03:12 2020 +0000
@@ -5487,6 +5487,19 @@
}
static int
+zfs_spec_fsync(void *v)
+{
+ struct vop_fsync_args *ap = v;
+ int error;
+
+ error = spec_fsync(v);
+ if (error)
+ return error;
+
+ return (zfs_fsync(ap->a_vp, ap->a_flags, ap->a_cred, NULL));
+}
+
+static int
zfs_netbsd_getattr(void *v)
{
struct vop_getattr_args *ap = v;
@@ -6332,7 +6345,7 @@
{ &vop_poll_desc, spec_poll },
{ &vop_kqfilter_desc, spec_kqfilter },
{ &vop_revoke_desc, spec_revoke },
- { &vop_fsync_desc, zfs_netbsd_fsync },
+ { &vop_fsync_desc, zfs_spec_fsync },
{ &vop_remove_desc, spec_remove },
{ &vop_link_desc, spec_link },
{ &vop_lock_desc, zfs_netbsd_lock },
@@ -6352,6 +6365,8 @@
{ &vop_mmap_desc, spec_mmap },
{ &vop_islocked_desc, zfs_netbsd_islocked },
{ &vop_advlock_desc, spec_advlock },
+ { &vop_strategy_desc, spec_strategy },
+ { &vop_bwrite_desc, spec_bwrite },
{ &vop_print_desc, zfs_netbsd_print },
{ &vop_fcntl_desc, zfs_netbsd_fcntl },
{ NULL, NULL }
diff -r 259cad249918 -r cdcb696c625a external/cddl/osnet/sys/kern/misc.c
--- a/external/cddl/osnet/sys/kern/misc.c Tue Feb 25 19:25:19 2020 +0000
+++ b/external/cddl/osnet/sys/kern/misc.c Tue Feb 25 20:03:12 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.5 2018/05/28 21:05:09 chs Exp $ */
+/* $NetBSD: misc.c,v 1.5.4.1 2020/02/25 20:03:12 martin Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
strlcpy(utsname.sysname, ostype, sizeof(utsname.sysname));
strlcpy(utsname.nodename, hostname, sizeof(utsname.nodename));
strlcpy(utsname.release, osrelease, sizeof(utsname.release));
- strlcpy(utsname.version, "OpenSolaris", sizeof(utsname.version));
+ strlcpy(utsname.version, version, sizeof(utsname.version));
strlcpy(utsname.machine, machine, sizeof(utsname.machine));
}
Home |
Main Index |
Thread Index |
Old Index