ubik: rename DInit, call from initialization sequence

Rename DInit to udisk_Init, and call it from the general
initialization sequence.  udisk_begin can now assume that this
has been done.

Change-Id: I88f38b7a846b635e0c42f42cdf8c9005bb4bf62d
Reviewed-on: http://gerrit.openafs.org/4140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Marc Dionne 2011-01-19 21:39:44 -05:00 committed by Derrick Brashear
parent a0d56ceb94
commit ba80a8a88b
3 changed files with 5 additions and 8 deletions

View File

@ -57,7 +57,6 @@ static int calls = 0, ios = 0, lastb = 0;
static char *BufferData;
static struct buffer *newslot(struct ubik_dbase *adbase, afs_int32 afid,
afs_int32 apage);
static int initd = 0;
#define BADFID 0xffffffff
static int DTrunc(struct ubik_trans *atrans, afs_int32 fid, afs_int32 length);
@ -247,8 +246,8 @@ udisk_LogWriteData(struct ubik_dbase *adbase, afs_int32 afile, void *abuffer,
return 0;
}
static int
DInit(int abuffers)
int
udisk_Init(int abuffers)
{
/* Initialize the venus buffer system. */
int i;
@ -847,11 +846,6 @@ udisk_begin(struct ubik_dbase *adbase, int atype, struct ubik_trans **atrans)
struct ubik_trans *tt;
*atrans = (struct ubik_trans *)NULL;
/* Make sure system is initialized before doing anything */
if (!initd) {
initd = 1;
DInit(ubik_nBuffers);
}
if (atype == UBIK_WRITETRANS) {
if (adbase->flags & DBWRITING)
return USYNC;

View File

@ -423,6 +423,8 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
if (code < 0)
return code;
udisk_Init(ubik_nBuffers);
ubik_callPortal = myPort;
/* try to get an additional security object */
ubik_sc[0] = rxnull_NewServerSecurityObject();

View File

@ -420,6 +420,7 @@ extern void *ubeacon_Interact(void *);
/*\}*/
/*! \name disk.c */
extern int udisk_Init(int nBUffers);
extern void udisk_Debug(struct ubik_debug *aparm);
extern int udisk_Invalidate(struct ubik_dbase *adbase, afs_int32 afid);
extern int udisk_read(struct ubik_trans *atrans, afs_int32 afile,