CVS commit: src/sys/rump/fs/lib/libzfs

2021-04-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 15 17:31:16 UTC 2021

Modified Files:
src/sys/rump/fs/lib/libzfs: Makefile

Log Message:
fix reversed comment


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/fs/lib/libzfs/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/Makefile
diff -u src/sys/rump/fs/lib/libzfs/Makefile:1.7 src/sys/rump/fs/lib/libzfs/Makefile:1.8
--- src/sys/rump/fs/lib/libzfs/Makefile:1.7	Sun Sep  6 03:20:30 2020
+++ src/sys/rump/fs/lib/libzfs/Makefile	Thu Apr 15 13:31:15 2021
@@ -1,6 +1,10 @@
-#	$NetBSD: Makefile,v 1.7 2020/09/06 07:20:30 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2021/04/15 17:31:15 christos Exp $
 #
 
+NEED_ISYSTEM=	# Tell rump that we must use -isystem
+
+.include 
+
 S!= cd ${.PARSEDIR}/../../../../;pwd
 
 .include "${.CURDIR}/../../../../modules/zfs/Makefile.zfsmod"



CVS commit: src/sys/rump/fs/lib/libzfs

2014-03-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Mar 13 01:46:10 UTC 2014

Modified Files:
src/sys/rump/fs/lib/libzfs: Makefile
Added Files:
src/sys/rump/fs/lib/libzfs: zfs_component.c
Removed Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
rename component.c -> zfs_component.c


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/fs/lib/libzfs/Makefile
cvs rdiff -u -r1.6 -r0 src/sys/rump/fs/lib/libzfs/component.c
cvs rdiff -u -r0 -r1.1 src/sys/rump/fs/lib/libzfs/zfs_component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/Makefile
diff -u src/sys/rump/fs/lib/libzfs/Makefile:1.3 src/sys/rump/fs/lib/libzfs/Makefile:1.4
--- src/sys/rump/fs/lib/libzfs/Makefile:1.3	Thu Mar 10 19:24:37 2011
+++ src/sys/rump/fs/lib/libzfs/Makefile	Thu Mar 13 01:46:10 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/03/10 19:24:37 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2014/03/13 01:46:10 pooka Exp $
 #
 
 S!= cd ${.PARSEDIR}/../../../../;pwd
@@ -11,7 +11,7 @@ LIB=	rumpfs_zfs
 CPPFLAGS+=  -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\
 		-I${RUMPTOP}/librump/rumpdev
 
-SRCS+=	component.c
+SRCS+=	zfs_component.c
 
 .include 
 .include 

Added files:

Index: src/sys/rump/fs/lib/libzfs/zfs_component.c
diff -u /dev/null src/sys/rump/fs/lib/libzfs/zfs_component.c:1.1
--- /dev/null	Thu Mar 13 01:46:10 2014
+++ src/sys/rump/fs/lib/libzfs/zfs_component.c	Thu Mar 13 01:46:10 2014
@@ -0,0 +1,57 @@
+/*	$NetBSD: zfs_component.c,v 1.1 2014/03/13 01:46:10 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: zfs_component.c,v 1.1 2014/03/13 01:46:10 pooka Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include "rump_private.h"
+#include "rump_vfs_private.h"
+
+RUMP_COMPONENT(RUMP_COMPONENT_VFS)
+{
+	extern const struct bdevsw zfs_bdevsw;
+	extern const struct cdevsw zfs_cdevsw;
+	devmajor_t bmaj, cmaj;
+	int error;
+
+	/* go, mydevfs */
+	bmaj = cmaj = -1;
+
+	if ((error = devsw_attach("zfs", &zfs_bdevsw, &bmaj,
+	&zfs_cdevsw, &cmaj)) != 0 && error != EEXIST)
+		panic("cannot attach zfs: %d", error);
+
+	if ((error = rump_vfs_makeonedevnode(S_IFCHR,
+	"/dev/zfs", cmaj, 0)) != 0)
+		panic("cannot create zfs dev nodes: %d", error);
+	devsw_detach(&zfs_bdevsw, &zfs_cdevsw);
+}



CVS commit: src/sys/rump/fs/lib/libzfs

2013-03-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 10 04:24:16 UTC 2013

Modified Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
Now that the auto-loading zfs bug has been fixed, the loading failed because
the devsw node was busied here. Since we load the devsw only for the purpose
of creating the device node in our virtual filesystem, detach it after we
are done so that the real module can reload it.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/fs/lib/libzfs/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/component.c
diff -u src/sys/rump/fs/lib/libzfs/component.c:1.5 src/sys/rump/fs/lib/libzfs/component.c:1.6
--- src/sys/rump/fs/lib/libzfs/component.c:1.5	Thu Mar 10 17:11:05 2011
+++ src/sys/rump/fs/lib/libzfs/component.c	Sat Mar  9 23:24:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.5 2011/03/10 22:11:05 wiz Exp $	*/
+/*	$NetBSD: component.c,v 1.6 2013/03/10 04:24:16 christos Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.5 2011/03/10 22:11:05 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.6 2013/03/10 04:24:16 christos Exp $");
 
 #include 
 #include 
@@ -53,4 +53,5 @@ RUMP_COMPONENT(RUMP_COMPONENT_VFS)
 	if ((error = rump_vfs_makeonedevnode(S_IFCHR,
 	"/dev/zfs", cmaj, 0)) != 0)
 		panic("cannot create zfs dev nodes: %d", error);
+	devsw_detach(&zfs_bdevsw, &zfs_cdevsw);
 }



CVS commit: src/sys/rump/fs/lib/libzfs

2011-03-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar 10 22:11:05 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
When panicing, at least tell the _real_ reason.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/rump/fs/lib/libzfs/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/component.c
diff -u src/sys/rump/fs/lib/libzfs/component.c:1.4 src/sys/rump/fs/lib/libzfs/component.c:1.5
--- src/sys/rump/fs/lib/libzfs/component.c:1.4	Thu Mar 10 19:24:37 2011
+++ src/sys/rump/fs/lib/libzfs/component.c	Thu Mar 10 22:11:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.4 2011/03/10 19:24:37 pooka Exp $	*/
+/*	$NetBSD: component.c,v 1.5 2011/03/10 22:11:05 wiz Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.4 2011/03/10 19:24:37 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.5 2011/03/10 22:11:05 wiz Exp $");
 
 #include 
 #include 
@@ -52,5 +52,5 @@
 
 	if ((error = rump_vfs_makeonedevnode(S_IFCHR,
 	"/dev/zfs", cmaj, 0)) != 0)
-		panic("cannot create cooked cgd dev nodes: %d", error);
+		panic("cannot create zfs dev nodes: %d", error);
 }



CVS commit: src/sys/rump/fs/lib/libzfs

2011-03-10 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Mar 10 19:24:38 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libzfs: Makefile
Added Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
autocreate /dev/zfs.  requested by riz


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/fs/lib/libzfs/Makefile
cvs rdiff -u -r0 -r1.4 src/sys/rump/fs/lib/libzfs/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/Makefile
diff -u src/sys/rump/fs/lib/libzfs/Makefile:1.2 src/sys/rump/fs/lib/libzfs/Makefile:1.3
--- src/sys/rump/fs/lib/libzfs/Makefile:1.2	Fri Jan 21 13:11:04 2011
+++ src/sys/rump/fs/lib/libzfs/Makefile	Thu Mar 10 19:24:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/01/21 13:11:04 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2011/03/10 19:24:37 pooka Exp $
 #
 
 S!= cd ${.PARSEDIR}/../../../../;pwd
@@ -11,6 +11,7 @@
 CPPFLAGS+=  -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\
 		-I${RUMPTOP}/librump/rumpdev
 
+SRCS+=	component.c
 
 .include 
 .include 

Added files:

Index: src/sys/rump/fs/lib/libzfs/component.c
diff -u /dev/null src/sys/rump/fs/lib/libzfs/component.c:1.4
--- /dev/null	Thu Mar 10 19:24:38 2011
+++ src/sys/rump/fs/lib/libzfs/component.c	Thu Mar 10 19:24:37 2011
@@ -0,0 +1,56 @@
+/*	$NetBSD: component.c,v 1.4 2011/03/10 19:24:37 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.4 2011/03/10 19:24:37 pooka Exp $");
+
+#include 
+#include 
+#include 
+#include 
+
+#include "rump_private.h"
+#include "rump_vfs_private.h"
+
+RUMP_COMPONENT(RUMP_COMPONENT_VFS)
+{
+	extern const struct bdevsw zfs_bdevsw;
+	extern const struct cdevsw zfs_cdevsw;
+	devmajor_t bmaj, cmaj;
+	int error;
+
+	/* go, mydevfs */
+	bmaj = cmaj = -1;
+
+	if ((error = devsw_attach("zfs", &zfs_bdevsw, &bmaj,
+	&zfs_cdevsw, &cmaj)) != 0 && error != EEXIST)
+		panic("cannot attach zfs: %d", error);
+
+	if ((error = rump_vfs_makeonedevnode(S_IFCHR,
+	"/dev/zfs", cmaj, 0)) != 0)
+		panic("cannot create cooked cgd dev nodes: %d", error);
+}



CVS commit: src/sys/rump/fs/lib/libzfs

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 13:11:32 UTC 2011

Removed Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
no longer used


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/sys/rump/fs/lib/libzfs/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/fs/lib/libzfs

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 12:23:29 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
don't perform tasks already done by zfs_modcmd


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/fs/lib/libzfs/component.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/fs/lib/libzfs/component.c
diff -u src/sys/rump/fs/lib/libzfs/component.c:1.1 src/sys/rump/fs/lib/libzfs/component.c:1.2
--- src/sys/rump/fs/lib/libzfs/component.c:1.1	Tue Jan 18 22:21:23 2011
+++ src/sys/rump/fs/lib/libzfs/component.c	Fri Jan 21 12:23:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.1 2011/01/18 22:21:23 haad Exp $ */
+/*	$NetBSD: component.c,v 1.2 2011/01/21 12:23:29 pooka Exp $ */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.1 2011/01/18 22:21:23 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.2 2011/01/21 12:23:29 pooka Exp $");
 
 #include 
 #include 
@@ -80,31 +80,10 @@
 #include "rump_dev_private.h"
 #include "rump_vfs_private.h"
 
-RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
+RUMP_COMPONENT(RUMP_COMPONENT_VFS)
 {
-	int error;
-
 	extern int physmem;
 
-	extern uint_t zfs_fsyncer_key;
-	extern uint_t rrw_tsd_key;
-
-	extern const struct bdevsw zfs_bdevsw;
-	extern const struct cdevsw zfs_cdevsw;
-
-	static int	zfs_bmajor = -1;
-	static int	zfs_cmajor = -1;
-
 	/* Set physmem to fit zfs limits. ZFS_MINMEGS * 2048 / PAGE_SIZE */
 	physmem = 262144;
-	error = devsw_attach("zfs", &zfs_bdevsw, &zfs_bmajor,
-	&zfs_cdevsw, &zfs_cmajor);
-	if (error != 0) {
-		zvol_fini();
-		zfs_vfsfini();
-		spa_fini();
-		lwp_specific_key_delete(zfs_fsyncer_key);
-		lwp_specific_key_delete(rrw_tsd_key);
-	}
-	return;
 }