Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Teach dk(4) about ZFS.



details:   https://anonhg.NetBSD.org/src/rev/d0aaae32db62
branches:  trunk
changeset: 970626:d0aaae32db62
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon Mar 30 08:36:09 2020 +0000

description:
Teach dk(4) about ZFS.

"looks ok" mlelstv

diffstat:

 common/lib/libutil/getfstypename.c |  8 +++++---
 sbin/dkctl/dkctl.8                 |  7 ++++---
 sys/dev/dkwedge/dkwedge_gpt.c      |  5 +++--
 sys/sys/disk.h                     |  3 ++-
 4 files changed, 14 insertions(+), 9 deletions(-)

diffs (103 lines):

diff -r 3c5bd03c8beb -r d0aaae32db62 common/lib/libutil/getfstypename.c
--- a/common/lib/libutil/getfstypename.c        Mon Mar 30 08:34:38 2020 +0000
+++ b/common/lib/libutil/getfstypename.c        Mon Mar 30 08:36:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $    */
+/*     $NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $   */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -39,10 +39,10 @@
 # include <sys/cdefs.h>
 # ifndef _KERNEL
 #  if !defined(lint)
-__RCSID("$NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $");
+__RCSID("$NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $");
 #  endif
 # else
-__KERNEL_RCSID(0, "$NetBSD: getfstypename.c,v 1.9 2018/11/06 04:04:33 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: getfstypename.c,v 1.10 2020/03/30 08:36:09 wiz Exp $");
 # endif /* _KERNEL */
 
 # define FSTYPE_ENUMNAME fstype_enum
@@ -129,6 +129,8 @@
                return DKW_PTYPE_VMFS;
        case FS_VMWRESV:
                return DKW_PTYPE_VMWRESV;
+       case FS_ZFS:
+               return DKW_PTYPE_ZFS;
        }
        /* Stupid gcc, should know it is impossible to get here */
        /*NOTREACHED*/
diff -r 3c5bd03c8beb -r d0aaae32db62 sbin/dkctl/dkctl.8
--- a/sbin/dkctl/dkctl.8        Mon Mar 30 08:34:38 2020 +0000
+++ b/sbin/dkctl/dkctl.8        Mon Mar 30 08:36:09 2020 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: dkctl.8,v 1.28 2018/01/07 18:11:35 wiz Exp $
+.\"    $NetBSD: dkctl.8,v 1.29 2020/03/30 08:36:09 wiz Exp $
 .\"
 .\" Copyright 2002 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 7, 2018
+.Dd March 29, 2020
 .Dt DKCTL 8
 .Os
 .Sh NAME
@@ -94,8 +94,9 @@
 .Ar ccd ,
 .Ar appleufs ,
 .Ar ntfs ,
+.Ar cgd ,
 and
-.Ar cgd .
+.Ar zfs .
 .Pp
 The device name of the virtual block device assigned to the wedge will be
 displayed after the wedge has been successfully created.
diff -r 3c5bd03c8beb -r d0aaae32db62 sys/dev/dkwedge/dkwedge_gpt.c
--- a/sys/dev/dkwedge/dkwedge_gpt.c     Mon Mar 30 08:34:38 2020 +0000
+++ b/sys/dev/dkwedge/dkwedge_gpt.c     Mon Mar 30 08:36:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $    */
+/*     $NetBSD: dkwedge_gpt.c,v 1.25 2020/03/30 08:36:09 wiz Exp $     */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.24 2019/07/09 17:06:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.25 2020/03/30 08:36:09 wiz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,6 +78,7 @@
        { GPT_ENT_TYPE_VMWARE_RESERVED,         DKW_PTYPE_VMWRESV },
        { GPT_ENT_TYPE_MS_BASIC_DATA,           DKW_PTYPE_NTFS },
        { GPT_ENT_TYPE_LINUX_DATA,              DKW_PTYPE_EXT2FS },
+       { GPT_ENT_TYPE_FREEBSD_ZFS,             DKW_PTYPE_ZFS },
 };
 
 static const char *
diff -r 3c5bd03c8beb -r d0aaae32db62 sys/sys/disk.h
--- a/sys/sys/disk.h    Mon Mar 30 08:34:38 2020 +0000
+++ b/sys/sys/disk.h    Mon Mar 30 08:36:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disk.h,v 1.75 2020/03/02 16:01:56 riastradh Exp $      */
+/*     $NetBSD: disk.h,v 1.76 2020/03/30 08:36:09 wiz Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -211,6 +211,7 @@
 #define        DKW_PTYPE_VMKCORE       "vmkcore"
 #define        DKW_PTYPE_VMFS          "vmfs"
 #define        DKW_PTYPE_VMWRESV       "vmwresv"
+#define        DKW_PTYPE_ZFS           "zfs"
 
 /*
  * Ensure each symbol used in FSTYPE_DEFN in <sys/disklabel.h>



Home | Main Index | Thread Index | Old Index