Default to inactive-on-demand, use inactive setback to request inactive
to be called for a removed node (for unix open file semantics).
This commit is contained in:
parent
7faf2bccbe
commit
2893a07834
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dtfs.c,v 1.21 2007/04/22 18:03:18 pooka Exp $ */
|
||||
/* $NetBSD: dtfs.c,v 1.22 2007/05/07 17:18:50 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
@ -75,6 +75,7 @@ dosuspend(int v)
|
||||
{
|
||||
|
||||
puffs_fs_suspend(pu);
|
||||
puffs_fs_suspend(pu);
|
||||
}
|
||||
|
||||
int
|
||||
@ -92,9 +93,10 @@ main(int argc, char *argv[])
|
||||
|
||||
setprogname(argv[0]);
|
||||
|
||||
pflags = lflags = mntflags = 0;
|
||||
lflags = mntflags = 0;
|
||||
khashbuckets = 256;
|
||||
while ((ch = getopt(argc, argv, "bc:do:s")) != -1) {
|
||||
pflags = PUFFS_KFLAG_IAONDEMAND;
|
||||
while ((ch = getopt(argc, argv, "bc:dio:s")) != -1) {
|
||||
switch (ch) {
|
||||
case 'b': /* build paths, for debugging the feature */
|
||||
pflags |= PUFFS_FLAG_BUILDPATH;
|
||||
@ -105,6 +107,9 @@ main(int argc, char *argv[])
|
||||
case 'd':
|
||||
dynamicfh = 1;
|
||||
break;
|
||||
case 'i':
|
||||
pflags &= ~PUFFS_KFLAG_IAONDEMAND;
|
||||
break;
|
||||
case 'o':
|
||||
mp = getmntopts(optarg, puffsmopts, &mntflags, &pflags);
|
||||
if (mp == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dtfs_vnops.c,v 1.24 2007/04/20 08:29:28 pooka Exp $ */
|
||||
/* $NetBSD: dtfs_vnops.c,v 1.25 2007/05/07 17:18:50 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
@ -191,6 +191,9 @@ dtfs_node_remove(struct puffs_cc *pcc, void *opc, void *targ,
|
||||
|
||||
dtfs_nukenode(targ, pn_parent, pcn->pcn_name);
|
||||
|
||||
/* call inactive for removed node when its time comes */
|
||||
puffs_setback(pcc, PUFFS_SETBACK_INACT_N2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user