UBIK_VERSION_LOCK;
ttid.epoch = version_globals.ubik_epochTime;
- if (ubik_dbase->flags & DBWRITING) {
+ if (ubik_dbase->dbFlags & DBWRITING) {
/*
* if a write is in progress, we have to send the writeTidCounter
* which holds the tid counter of the write transaction , and not
*atrans = NULL;
if (atype == UBIK_WRITETRANS) {
- if (adbase->flags & DBWRITING)
+ if (adbase->dbFlags & DBWRITING)
return USYNC;
code = udisk_LogOpcode(adbase, LOGNEW, 0);
if (code)
adbase->readers++;
else if (atype == UBIK_WRITETRANS) {
UBIK_VERSION_LOCK;
- adbase->flags |= DBWRITING;
+ adbase->dbFlags |= DBWRITING;
UBIK_VERSION_UNLOCK;
}
*atrans = tt;
* will do nothing because the abort is there or no LogEnd opcode.
*/
dbase = atrans->dbase;
- if (atrans->type == UBIK_WRITETRANS && dbase->flags & DBWRITING) {
+ if (atrans->type == UBIK_WRITETRANS && dbase->dbFlags & DBWRITING) {
udisk_LogOpcode(dbase, LOGABORT, 1);
code = (*dbase->truncate) (dbase, LOGFILE, 0);
if (code)
/* check if we are the write trans before unsetting the DBWRITING bit, else
* we could be unsetting someone else's bit.
*/
- if (atrans->type == UBIK_WRITETRANS && dbase->flags & DBWRITING) {
+ if (atrans->type == UBIK_WRITETRANS && dbase->dbFlags & DBWRITING) {
UBIK_VERSION_LOCK;
- dbase->flags &= ~DBWRITING;
+ dbase->dbFlags &= ~DBWRITING;
UBIK_VERSION_UNLOCK;
} else {
dbase->readers--;
#ifdef AFS_PTHREAD_ENV
opr_cv_broadcast(&dbase->flags_cond);
#else
- LWP_NoYieldSignal(&dbase->flags);
+ LWP_NoYieldSignal(&dbase->dbFlags);
#endif
return 0;
}
* the write-lock above if there is a write transaction in progress,
* but then, it won't hurt to check, will it?
*/
- if (ubik_dbase->flags & DBWRITING) {
+ if (ubik_dbase->dbFlags & DBWRITING) {
struct timeval tv;
int safety = 0;
long cur_usec = 50000;
- while ((ubik_dbase->flags & DBWRITING) && (safety < 500)) {
+ while ((ubik_dbase->dbFlags & DBWRITING) && (safety < 500)) {
DBRELE(ubik_dbase);
/* sleep for a little while */
tv.tv_sec = 0;
* don't know how to restore one without possibly picking up some data from the other. */
if (transMode == UBIK_WRITETRANS) {
/* if we're writing already, wait */
- while (dbase->flags & DBWRITING) {
+ while (dbase->dbFlags & DBWRITING) {
#ifdef AFS_PTHREAD_ENV
opr_cv_wait(&dbase->flags_cond, &dbase->versionLock);
#else
DBRELE(dbase);
- LWP_WaitProcess(&dbase->flags);
+ LWP_WaitProcess(&dbase->dbFlags);
DBHOLD(dbase);
#endif
}
#endif
afs_int32 tidCounter; /*!< last RW or RO trans tid counter */
afs_int32 writeTidCounter; /*!< last write trans tid counter */
- afs_int32 flags; /*!< flags */
+ afs_int32 dbFlags; /*!< flags */
/* physio procedures */
int (*read) (struct ubik_dbase * adbase, afs_int32 afile, void *abuffer,
afs_int32 apos, afs_int32 alength);
/*!
* \brief The version lock protects the structure member, as well as
- * the database version, flags, tidCounter, writeTidCounter. Reading these
+ * the database version, dbFlags, tidCounter, writeTidCounter. Reading these
* values can be done while holding either UBIK_VERSION_LOCK or DBHOLD. Writing
* these requires holding both locks.
*/
&& (urecovery_state & UBIK_RECHAVEDB)) {
aparm->recoveryState |= UBIK_RECLABELDB;
}
- aparm->activeWrite = (ubik_dbase->flags & DBWRITING);
+ aparm->activeWrite = (ubik_dbase->dbFlags & DBWRITING);
aparm->tidCounter = ubik_dbase->tidCounter;
if (ubik_currentTrans) {
&& (urecovery_state & UBIK_RECHAVEDB)) {
aparm->recoveryState |= UBIK_RECLABELDB;
}
- aparm->activeWrite = (ubik_dbase->flags & DBWRITING);
+ aparm->activeWrite = (ubik_dbase->dbFlags & DBWRITING);
aparm->tidCounter = ubik_dbase->tidCounter;
if (ubik_currentTrans) {