S<<< [B<-confdir> <I<configuration directory>>] >>>
S<<< [B<-daemons> <I<number of daemons to use>>] >>>
S<<< [B<-dcache> <I<number of dcache entries>>] >>> [B<-debug>]
- [B<-dynroot>] [B<-enable_peer_stats>] [B<-enable_process_stats>]
- [B<-fakestat>] [B<-fakestat-all>]
+ [B<-dynroot>] [B<-dynroot-sparse>] [B<-enable_peer_stats>]
+ [B<-enable_process_stats>] [B<-fakestat>] [B<-fakestat-all>]
S<<< [B<-files> <I<files in cache>>] >>>
S<<< [B<-files_per_subdir> <I<log(2) of files per dir>> ] >>>
[B<-help>] S<<< [B<-logfile> <I<Place to keep the CM log>>] >>>
which provides equivalent functionality to the most commonly used symbolic
links.
+=item B<-dynroot-sparse>
+
+In addition to operating in the manner described for dynroot above,
+cells other than the local cell are not shown by default until a lookup
+occurs. Cell aliases as set in the CellAliases file are shown as normal,
+although they may appear to be dangling links until traversed.
+
=item B<-enable_peer_stats>
Activates the collection of Rx statistics and allocates memory for their
if (!afs_InReadDir(adp))
afs_PutDCache(tdc);
if (code == ENOENT && afs_IsDynroot(adp) && dynrootRetry && !tryEvalOnly) {
+ struct cell *tc;
+ char *cn = (tname[0] == '.') ? tname + 1 : tname;
ReleaseReadLock(&adp->lock);
+ /* confirm it's not just hushed */
+ tc = afs_GetCellByName(cn, WRITE_LOCK);
+ if (tc) {
+ if (tc->states & CHush) {
+ tc->states &= ~CHush;
+ ReleaseWriteLock(&tc->lock);
+ afs_DynrootInvalidate();
+ goto redo;
+ }
+ ReleaseWriteLock(&tc->lock);
+ }
+ /* Allow a second dynroot retry if the cell was hushed before */
dynrootRetry = 0;
if (tname[0] == '.')
afs_LookupAFSDB(tname + 1);
#define CNoAFSDB 0x08 /* never bother trying AFSDB */
#define CHasVolRef 0x10 /* volumes were referenced */
#define CLinkedCell 0x20 /* has a linked cell in lcellp */
+#define CHush 0x40 /* don't display until referenced */
struct cell {
struct afs_q lruq; /* lru q next and prev */
cflags |= CLinkedCell;
}
}
+ if (parm4 & 8) {
+ cflags |= CHush;
+ }
if (!code)
code =
afs_NewCell(tbuffer1, tcell->hosts, cflags, lcnamep,
ReleaseWriteLock(&tc->lock);
ReleaseWriteLock(&afs_xcell);
afs_PutCell(tc, 0);
- afs_DynrootInvalidate();
+ if (!aflags & CHush)
+ afs_DynrootInvalidate();
return 0;
bad:
c = afs_GetCellByIndex(cellidx, READ_LOCK);
if (!c)
break;
- if (c->cellNum == afs_dynrootCell)
+ if ((c->cellNum == afs_dynrootCell) || (c->states & CHush)) {
+ afs_PutCell(c, READ_LOCK);
continue;
-
+ }
dotLen = strlen(c->cellName) + 2;
dotCell = afs_osi_Alloc(dotLen);
strcpy(dotCell, ".");
c = afs_GetCellByIndex(cellidx, READ_LOCK);
if (!c)
continue;
- if (c->cellNum == afs_dynrootCell)
+ if ((c->cellNum == afs_dynrootCell) || (c->states & CHush)) {
+ afs_PutCell(c, READ_LOCK);
continue;
+ }
dotLen = strlen(c->cellName) + 2;
dotCell = afs_osi_Alloc(dotLen);
/* figure out if this is the home cell */
isHomeCell = (strcmp(aci->name, LclCellName) == 0);
- if (!isHomeCell)
+ if (!isHomeCell) {
cellFlags = 2; /* not home, suid is forbidden */
-
+ if (enable_dynroot == 2)
+ cellFlags |= 8; /* don't display foreign cells until looked up */
+ }
/* build address list */
for (i = 0; i < MAXHOSTSPERCELL; i++)
memcpy(&hosts[i], &aci->hostAddr[i].sin_addr, sizeof(afs_int32));
/* -rxmaxmtu */
rxmaxmtu = atoi(as->parms[36].items->data);
}
+ if (as->parms[37].items) {
+ /* -dynroot-sparse */
+ enable_dynroot = 2;
+ }
return 0;
}
if (enable_dynroot) {
if (afsd_verbose)
- printf("%s: Enabling dynroot support in kernel.\n", rn);
+ printf("%s: Enabling dynroot support in kernel%s.\n", rn,
+ (enable_dynroot==2)?", not showing cells.":"");
code = afsd_call_syscall(AFSOP_SET_DYNROOT, 1);
if (code)
printf("%s: Error enabling dynroot support.\n", rn);
if (enable_fakestat) {
if (afsd_verbose)
- printf("%s: Enabling fakestat support in kernel.\n", rn);
+ printf("%s: Enabling fakestat support in kernel%s.\n", rn,
+ (enable_fakestat==2)?" for all mountpoints."
+ :" for crosscell mountpoints");
code = afsd_call_syscall(AFSOP_SET_FAKESTAT, enable_fakestat);
if (code)
printf("%s: Error enabling fakestat support.\n", rn);
cmd_AddParm(ts, "-disable-dynamic-vcaches", CMD_FLAG, CMD_OPTIONAL,
"disable stat/vcache cache growing as needed");
cmd_AddParm(ts, "-rxmaxmtu", CMD_SINGLE, CMD_OPTIONAL, "set rx max MTU to use");
+ cmd_AddParm(ts, "-dynroot-sparse", CMD_FLAG, CMD_OPTIONAL,
+ "Enable dynroot support with minimal cell list");
}
int