/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define _VOLSER_ 1
#ifdef AFS_PTHREAD_ENV
-#include <assert.h>
#include <pthread.h>
#endif
#define volser_RW 0
#define volser_RO 1
#define volser_BACK 2
+#define volser_RWREPL 3
#define THOLD(tt) ((tt)->refCount++)
};
-/* This is how often the garbage collection thread wakes up and
+/* This is how often the garbage collection thread wakes up and
* checks for transactions that have timed out: BKGLoop()
*/
#define GCWAKEUP 30
#ifdef AFS_PTHREAD_ENV
#define VTRANS_OBJ_LOCK_INIT(tt) \
- assert(pthread_mutex_init(&((tt)->lock),NULL) == 0)
+ MUTEX_INIT(&((tt)->lock), "vtrans obj", MUTEX_DEFAULT, 0);
#define VTRANS_OBJ_LOCK_DESTROY(tt) \
- assert(pthread_mutex_destroy(&((tt)->lock)) == 0)
+ MUTEX_DESTROY(&((tt)->lock))
#define VTRANS_OBJ_LOCK(tt) \
- assert(pthread_mutex_lock(&((tt)->lock)) == 0)
+ MUTEX_ENTER(&((tt)->lock))
#define VTRANS_OBJ_UNLOCK(tt) \
- assert(pthread_mutex_unlock(&((tt)->lock)) == 0)
+ MUTEX_EXIT(&((tt)->lock))
#else
#define VTRANS_OBJ_LOCK_INIT(tt)
#define VTRANS_OBJ_LOCK_DESTROY(tt)
#define VSALVAGE 101 /* Volume needs salvage */
#define VNOVNODE 102 /* Bad vnode number quoted */
-#define VNOVOL 103 /* Volume not attached, doesn't exist,
+#define VNOVOL 103 /* Volume not attached, doesn't exist,
* not created or not online */
#define VVOLEXISTS 104 /* Volume already exists */
#define VNOSERVICE 105 /* Volume is not in service (i.e. it's
#define VMOVED 111 /* Volume has moved to another server; do a VGetVolumeInfo
* to THIS server to find out where */
-#define MyPort 5003
-#define NameLen 80
#define VLDB_MAXSERVERS 10
#define VOLSERVICE_ID 4
#define INVALID_BID 0
#define ITSROVOL 0x02
#define ITSRWVOL 0x04
#define ITSBACKVOL 0x08
+#define ITSRWREPL 0x10
#define RO_DONTUSE 0x20
#define VLOP_RESTORE 0x100 /*this is bogus, clashes with VLOP_DUMP */
#define RV_NOVLDB 0x040000
#define RV_NOCLONE 0x080000
#define RV_NODEL 0x100000
+#define RV_RWONLY 0x200000
struct ubik_client;
extern afs_uint32 vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp);