X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=zfs%2Flib%2Flibzpool%2Fspa_history.c;h=c997240c148f23d6385609c2b5e2a114ea0bb2b8;hb=2f40ac4d9e154f1d1ca4073ef8c3bfba92093c86;hp=0fa6411a18dd788ebb9f3fc58ae1386e927618a1;hpb=34dc7c2f2553220ebc6e29ca195fb6d57155f95f;p=zfs.git diff --git a/zfs/lib/libzpool/spa_history.c b/zfs/lib/libzpool/spa_history.c index 0fa6411..c997240 100644 --- a/zfs/lib/libzpool/spa_history.c +++ b/zfs/lib/libzpool/spa_history.c @@ -20,11 +20,11 @@ */ /* - * 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 #include @@ -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);