summaryrefslogtreecommitdiff
path: root/node.h
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2009-04-13 01:03:40 +0300
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2009-04-13 01:03:40 +0300
commitc9110f9c7d71fa9b157540a7aa2ade7f34b79968 (patch)
tree86723a412757f6d44ac60e8efec921fd14777987 /node.h
parent0a5fcd403943fbbdc0a2ba35283f1135f97c48dc (diff)
nsmux can shutdown all dynamic translators on exit
Now nsmux can shutdown all of its dynamic translators on exit, thus doing sufficient cleanup. One can tell nsmux to shutdown dynamic translators using the ``--recursive'' option to settrans. Note that because fsys_goaway returns immediately as the RPC is processed, while the receiver may still remain in memory, doing something like settrans -g --recursive foo where nsmux is sitting on foo will almost always result in a ``Server busy'' error message. The reason is that libnetfs counts how many open ports to its nodes there are at shutdown and in most cases it does the check *before* the dynamic translators manage to drop their references. Therefore, the aforementioned command gracefully kills all dynamic translators. Invoked the second time, this command will shutdown nsmux, too. Immediate shutdown with killing dynamic translators can be achieved via settrans -gf --recursive foo
Diffstat (limited to 'node.h')
-rw-r--r--node.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/node.h b/node.h
index 72adcbebb..d930a3b69 100644
--- a/node.h
+++ b/node.h
@@ -32,6 +32,7 @@
#include <hurd/netfs.h>
/*---------------------------------------------------------------------------*/
#include "lnode.h"
+#include "trans.h"
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
@@ -74,9 +75,10 @@ struct netnode
/*a port to the underlying filesystem */
file_t port;
- /*the control port of the translator sitting on this node, in case
- this node is a shadow node */
- fsys_t trans_cntl;
+ /*a reference to the element in the list of dynamic translators
+ corresponding to the translator sitting on this node, in case this
+ node is a shadow node */
+ struct trans_el * dyntrans;
/*the reference to the shadow node that is below the current shadow
node in the dynamic translator stack */