Minor tweak to update script
[zfs.git] / zfs / lib / libzpool / spa_history.c
index 0fa6411..c997240 100644 (file)
  */
 
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident  "@(#)spa_history.c      1.5     07/07/09 SMI"
+#pragma ident  "%Z%%M% %I%     %E% SMI"
 
 #include <sys/spa.h>
 #include <sys/spa_impl.h>
@@ -399,6 +399,13 @@ spa_history_internal_log(history_internal_events_t event, spa_t *spa,
        char *str;
        va_list adx;
 
+       /*
+        * If this is part of creating a pool, not everything is
+        * initialized yet, so don't bother logging the internal events.
+        */
+       if (tx->tx_txg == TXG_INITIAL)
+               return;
+
        hap = kmem_alloc(sizeof (history_arg_t), KM_SLEEP);
        str = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP);