diff --git a/src/ubik/disk.c b/src/ubik/disk.c index c92117b39f..69a1115e86 100644 --- a/src/ubik/disk.c +++ b/src/ubik/disk.c @@ -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; diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index 20c19f1fe7..a2d6fc0ca6 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -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(); diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index fe454a2f17..eb24e9dbe5 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -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,