Module Name:    src
Committed By:   haad
Date:           Mon May 10 06:15:28 UTC 2010

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: spa.c

Log Message:
Fix spa_thread to compile under the NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.4
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.3	Sat Feb 27 23:43:53 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c	Mon May 10 06:15:28 2010
@@ -1,3 +1,4 @@
+
 /*
  * CDDL HEADER START
  *
@@ -671,13 +672,14 @@
 	callb_cpr_t cprinfo;
 
 	spa_t *spa = arg;
-#ifdef PORT_SOLARIS
-	user_t *pu = PTOU(curproc);
 
 	CALLB_CPR_INIT(&cprinfo, &spa->spa_proc_lock, callb_generic_cpr,
 	    spa->spa_name);
 
 	ASSERT(curproc != &p0);
+#ifdef PORT_SOLARIS
+	user_t *pu = PTOU(curproc);
+
 	(void) snprintf(pu->u_psargs, sizeof (pu->u_psargs),
 	    "zpool-%s", spa->spa_name);
 	(void) strlcpy(pu->u_comm, pu->u_psargs, sizeof (pu->u_comm));
@@ -753,7 +755,7 @@
 	ASSERT(spa->spa_proc_state == SPA_PROC_NONE);
 	ASSERT(spa->spa_proc == &p0);
 	spa->spa_did = 0;
-
+#if 0
 	/* Only create a process if we're going to be around a while. */
 	if (spa_create_process && strcmp(spa->spa_name, TRYIMPORT_NAME) != 0) {
 		if (newproc(spa_thread, (caddr_t)spa, syscid, maxclsyspri,
@@ -773,7 +775,8 @@
 			    spa->spa_name);
 #endif
 		}
-	}
+	}	
+#endif
 	mutex_exit(&spa->spa_proc_lock);
 
 	/* If we didn't create a process, we need to create our taskqs. */

Reply via email to