OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2872-gab97773

Gerrit Code Review gerrit@openafs.org
Tue, 4 Sep 2012 06:54:22 -0700 (PDT)


The following commit has been merged in the master branch:
commit ab977738b1542bee2dd780285ec90ebeebdc32c1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date:   Wed Sep 7 14:59:17 2011 +0100

    Further rationalise our usage of assert()
    
    This patch futher improves our usage of assert() and friends. The
    intention is to bring clarity to which forms of assert are used in
    which situations, and to solve the problem of assert(X), or
    osi_Assert(X) being used in a situation where X has side-effects.
    
    It introduces two new assertion macros opr_Assert() and opr_Verify(),
    and clarifies the usage of osi_Assert() and assert().
    
    *) opr_Assert is a direct equivalent of assert(), with the exception
       that its output can be redirected to a log file when used in server
       code. It is the preferred version of assert for libraries, and server
       side code. Note that whilst opr_Assert doesn't currently become a
       no-op when NDEBUG is defined, the intention is that it will do so at
       some point in the future.
    *) opr_Verify(X) asserts if the value of X is false. Unlike assert()
       it will always run X, regardless of whether the value is checked or
       not. The eventual intention is that when NDEBUG is defined,
       opr_Verify(X) => X
    *) osi_Assert is an assertion macro intended for use in kernel code,
       or in mixed kernel/userland code. When code is built for userspace,
       osi_Assert(X) => opr_Assert(X)
    *) assert is the system's own assert macro. It should only be used
       in client code. Whilst a header (opr_assert.h) is provided to map
       assert() to opr_Assert(), its use is discouraged
    
    Change-Id: Ie6d61305686bdc7193cc8690e6f4fbe363211faf
    Reviewed-on: http://gerrit.openafs.org/5395
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/WINNT/afsd/NTMakefile          |    1 +
 src/afs/UKERNEL/sysincludes.h      |   32 +++---
 src/afsd/afsd_kernel.c             |    2 +-
 src/aklog/klog.c                   |    1 -
 src/audit/audit.c                  |    3 +-
 src/auth/netrestrict.c             |   34 +++---
 src/bucoord/status.c               |    1 +
 src/budb/db_dump.c                 |    1 +
 src/budb/dbs_dump.c                |   22 +++--
 src/butc/lwps.c                    |    2 +-
 src/comerr/error_msg.c             |    8 +-
 src/crypto/hcrypto/kernel/config.h |    6 +-
 src/dir/buffer.c                   |    1 +
 src/libacl/aclprocs.c              |   18 ++--
 src/libadmin/kas/NTMakefile        |    1 +
 src/libadmin/pts/NTMakefile        |    1 +
 src/libadmin/vos/NTMakefile        |    1 +
 src/lwp/lock.c                     |    2 +
 src/lwp/lock.h                     |    1 +
 src/opr/opr.h                      |   12 ++
 src/pam/afs_util.c                 |    1 -
 src/ptserver/utils.c               |   13 +-
 src/rx/rx.c                        |    2 +
 src/rx/rx_conncache.c              |    1 +
 src/rx/rx_globals.h                |    2 +-
 src/rx/rx_misc.c                   |    2 +
 src/rx/rx_multi.c                  |    1 +
 src/rx/rx_packet.c                 |    1 +
 src/rx/rx_prototypes.h             |    1 -
 src/rx/rx_pthread.h                |   19 ++--
 src/rx/rx_rdwr.c                   |    1 +
 src/rx/rx_stats.c                  |    1 +
 src/rx/rx_user.h                   |    2 +-
 src/rxgen/rpc_main.c               |    1 +
 src/rxkad/bg-fcrypt.c              |    2 +
 src/rxkad/crypt_conn.c             |    1 +
 src/rxkad/fcrypt.c                 |    1 +
 src/rxkad/rxkad_client.c           |    1 +
 src/rxkad/rxkad_common.c           |    2 +-
 src/rxkad/rxkad_server.c           |    5 +-
 src/rxkad/stats.h                  |   14 +-
 src/ubik/beacon.c                  |    2 +-
 src/ubik/disk.c                    |    2 +-
 src/ubik/lock.c                    |    2 +-
 src/ubik/recovery.c                |    3 +-
 src/ubik/remote.c                  |    2 +-
 src/ubik/ubik.c                    |    9 +-
 src/ubik/ubikclient.c              |    5 +-
 src/ubik/vote.c                    |    2 +-
 src/util/serverLog.c               |    1 +
 src/util/thread_pool.c             |    7 +-
 src/util/work_queue.c              |   10 +-
 src/venus/afsio.c                  |    3 +-
 src/viced/afsfileprocs.c           |   89 +++++++-------
 src/viced/callback.c               |   11 +-
 src/viced/fsstats.c                |    1 +
 src/viced/host.c                   |   46 ++++----
 src/viced/host.h                   |    2 +-
 src/viced/serialize_state.c        |    2 +-
 src/viced/viced.c                  |   31 +++---
 src/viced/viced.h                  |    8 +-
 src/vol/daemon_com.c               |    2 +-
 src/vol/fssync-client.c            |    2 +-
 src/vol/fssync-debug.c             |    4 +-
 src/vol/fssync-server.c            |   45 ++++----
 src/vol/ihandle.c                  |   74 ++++++------
 src/vol/ihandle.h                  |    6 +-
 src/vol/listinodes.c               |    3 +-
 src/vol/namei_ops.c                |   11 +-
 src/vol/nuke.c                     |    2 +-
 src/vol/partition.c                |   34 +++---
 src/vol/physio.c                   |    2 -
 src/vol/salvaged.c                 |   35 +++---
 src/vol/salvsync-server.c          |   22 ++--
 src/vol/vg_cache.c                 |    7 +-
 src/vol/vg_scan.c                  |    3 +-
 src/vol/vnode.c                    |   34 +++---
 src/vol/vnode_inline.h             |   18 ++--
 src/vol/vol-salvage.c              |  173 ++++++++++++++--------------
 src/vol/volume.c                   |  227 +++++++++++++++++++-----------------
 src/vol/volume.h                   |    4 +-
 src/vol/volume_inline.h            |   12 +-
 src/vol/vutil.c                    |   13 +-
 src/volser/dumpstuff.c             |   26 ++--
 src/volser/volmain.c               |    9 +-
 src/volser/volprocs.c              |    8 +-
 src/volser/voltrans.c              |    2 +
 87 files changed, 658 insertions(+), 582 deletions(-)

-- 
OpenAFS Master Repository