[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tmpfs: now working

From: Neal H Walfield
Subject: Re: [PATCH] tmpfs: now working
Date: Fri, 20 Apr 2001 19:09:40 +0200
User-agent: Mutt/1.3.15i

> >     * tmpfs.c (main): Do not deallocate the underlying node;
> >     servers deallocate nodes based only on the number of outstanding
> >     protids.
> What is this supposed to be about?

In memory nodes are deallocated when there are no references to them (as
managed by diskfs_nref et al.).  fshelp_fetch_root, when it starts an
active translator, does not directly add a user reference to the node,
although it may indirectly via the callback to obtain a send right to the
underlying node.  Thus, when all the references to the in memory node
have been dropped, the node, whether it has an active translator or not,
is disposed of, the transbox that an active translator may live in is
destroy (libdiskfs/node-drop.c) and the control port is released
(libfshelp/drop-transbox.c).  As a result, the next time that the node
is reference (i.e. via file_lookup), a new in memory node will be built
with no active translator.

If we want to do as you suggest and only destroy a node when the there
is no active translator, we must add a user reference when an active
translator is started and drop one when the control port dies.  This
implies asking for dead name notification on active translator control
ports and changing the interfaces to fshelp_fetch_root to permit it to
add a user reference when it starts a translator or allow it to indicate
that it started the active translator.

>                                     There is no protocol requirement that a
> filesystem keep a send right to the underlying node.

Looking at libfshelp and, specifically, the implementation of
fshelp_drop_transbox, I would say that there is.

>                                                       Since diskfs doesn't
> have any use for it, it doesn't keep it.  You shouldn't leak the right if
> you aren't storing it anywhere.

Take a look at both ext2fs and ufs.  Neither deallocates its reference to
the underlying node.

Attachment: pgpGGDItcX3Cn.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]