venti: formatting changes in fixarenas

This commit is contained in:
Russ Cox 2007-09-24 22:33:34 -04:00
parent c1edcb95cf
commit 67a65bbaa5

View file

@ -15,6 +15,8 @@
#include "fns.h"
#include "whack.h"
#define ROUNDUP(x,n) (((x)+(n)-1)&~((n)-1))
#pragma varargck type "z" uvlong
#pragma varargck type "z" vlong
#pragma varargck type "t" uint
@ -794,7 +796,7 @@ guessgeometry(void)
ap.arenabase = bestdiff;
}
ap.tabbase = (PartBlank+HeadSize+ap.blocksize-1)&~(ap.blocksize-1);
ap.tabbase = ROUNDUP(PartBlank+HeadSize, ap.blocksize);
/*
* XXX pick up table, check arenabase.
* XXX pick up table, record base name.
@ -806,7 +808,7 @@ guessgeometry(void)
*/
if(ap.arenabase == 0){
for(i=0; i<nelem(tabsizes); i++){
ap.arenabase = (PartBlank+HeadSize+tabsizes[i]+ap.blocksize-1)&~(ap.blocksize-1);
ap.arenabase = ROUNDUP(PartBlank+HeadSize, ap.blocksize);
p = pagein(ap.arenabase, Block);
if(u32(p) == ArenaHeadMagic)
break;