Print this page
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zil.c
          +++ new/usr/src/uts/common/fs/zfs/zil.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright (c) 2011 by Delphix. All rights reserved.
       23 + * Copyright (c) 2012 by Delphix. All rights reserved.
  24   24   */
  25   25  
  26   26  /* Portions Copyright 2010 Robert Milkowski */
  27   27  
  28   28  #include <sys/zfs_context.h>
  29   29  #include <sys/spa.h>
  30   30  #include <sys/dmu.h>
  31   31  #include <sys/zap.h>
  32   32  #include <sys/arc.h>
  33   33  #include <sys/stat.h>
↓ open down ↓ 1021 lines elided ↑ open up ↑
1055 1055          /*
1056 1056           * We're actually making an entry, so update lrc_seq to be the
1057 1057           * log record sequence number.  Note that this is generally not
1058 1058           * equal to the itx sequence number because not all transactions
1059 1059           * are synchronous, and sometimes spa_sync() gets there first.
1060 1060           */
1061 1061          lrc->lrc_seq = ++zilog->zl_lr_seq; /* we are single threaded */
1062 1062          lwb->lwb_nused += reclen + dlen;
1063 1063          lwb->lwb_max_txg = MAX(lwb->lwb_max_txg, txg);
1064 1064          ASSERT3U(lwb->lwb_nused, <=, lwb->lwb_sz);
1065      -        ASSERT3U(P2PHASE(lwb->lwb_nused, sizeof (uint64_t)), ==, 0);
     1065 +        ASSERT0(P2PHASE(lwb->lwb_nused, sizeof (uint64_t)));
1066 1066  
1067 1067          return (lwb);
1068 1068  }
1069 1069  
1070 1070  itx_t *
1071 1071  zil_itx_create(uint64_t txtype, size_t lrsize)
1072 1072  {
1073 1073          itx_t *itx;
1074 1074  
1075 1075          lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t);
↓ open down ↓ 924 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX