From 127340741f01e7984aa48b637946b79e334b78b4 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Mon, 28 Sep 2009 18:08:36 +0300 Subject: Add the short documentation of unionmount. --- hurd/translator/unionfs.mdwn | 125 ++++++++++++++++++++++++++++++++++++++-- hurd/translator/unionmount.mdwn | 51 +--------------- 2 files changed, 122 insertions(+), 54 deletions(-) (limited to 'hurd') diff --git a/hurd/translator/unionfs.mdwn b/hurd/translator/unionfs.mdwn index b177b874..93a3a385 100644 --- a/hurd/translator/unionfs.mdwn +++ b/hurd/translator/unionfs.mdwn @@ -8,18 +8,135 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] +# `unionfs` + Source repository: +# `unionmount` + +... is a special mode of `unionfs`. + +## Project Idea + +When setting a translator on Hurd -- similar to mounting a file system on UNIX +-- the new node(s) exported by the translator are obscuring the original node +where the translator is set, and any nodes below it in the directory tree. The +translator itself can access the underlying node (which is a very nice feature, +as it allows translators presenting the contents of the node in a different +format); but it's no longer accessible from the "outside". + +Plan9 has a feature where a file system can be mounted in union mode: the new +file system doesn't obscure the mount point in this case, but instead the +contents are combined. (This feature has also been under discussion in Linux +for a couple of years now, under the label "VFS-based union mounts".) + +This kind of union mounts is generally useful, as it's sometimes more +convenient than unioning existing filesystem locations with unionfs -- it's not +necessary to mount a file system that is to be unioned at some external +location first: just union-mount it directly at the target location. + +But union mounts also allow creating passive translator hierarchies: If there +is a passive translator on a parent node, and further passive translators on +child nodes, the union mount allows the child nodes with the further translator +settings still to be visible after the parent translator has started. + +This could be useful for device nodes for example: let's say we have an +ethernet multiplexer at /dev/veth. Now the virtual subnodes could all be +directly under /dev, i.e. /dev/veth0, /dev/veth1 etc., and explicitely refer to +the main /dev/veth node in the translator command line. It would be more +elegant however to store the virtual nodes direcly below the main multiplexer +node -- /dev/veth/0, /dev/veth/1 etc. + +There are two possible approaches how union mounts could be implemented in the +Hurd. The first one is to let the various translators handle union mounts +internally, i.e. let them present the underlying nodes to the clients in +addition to the actual nodes they export themselfs. This probably can be +implemented as some kind of extension to the existing netfs and diskfs +libraries. + +The other possible apporach is less efficient and probably more tricky, but +probably also more generic: create a special unionmount translator, which +serves as a kind of proxy: setting the union-mounted translator on some +internal node; and at the actual mount location, presenting a union of the +nodes exported by this translator, and the nodes from the underlying file +system. + +The goal of this project is implementing union mounts using either of the +approaches described above. (Though it might be useful initially to prototype +both for comparision.) The ethernet multiplexer shall serve as an example use +case -- any changes necessary to allow using it with the union mount +functionality are also to be considered part of the task. + +## Implementation + +### Source + +Union mounts are currently implemented as two additional command line +options of the `unionfs` translator. This implementation resides in +the master-unionmount branch of the unionfs git repository. To +checkout the code, do the following: + + $ git clone git://git.sv.gnu.org/hurd/unionfs.git + $ cd unionfs + $ git checkout -b master-unionmount + $ git pull origin master-unionmount + +You can skip the checkout step if you don't mind that the +`master-unionmount` branch gets merged into the `master` branch. + +### Short Documentation + +The `unionmount` project adds options "--mount" and "--no-mount" to +`unionfs` (short versions: "-t" and "-n" correspondingly). Both +options are used to implement union-mounting, but the first option +will create a *transparent* union mount, while the second option will +create a *nontransparent* union mount. + +One can create a transparent union mount with the following command: + + $ settrans -a unionfs --underlying --mount= + +When running + + $ fsysopts + +one will see the information about the ``, not the +`unionfs` translator. Although this might seem the only natural way +to do union mounts, one must keep in mind that such transparency +deprives one of the possibility to modify the unioned virtual +filesystem exported by `unionfs` at run-time (via `fsysopts`). + +One can create a nontransparent union mount with the following command: + + $ settrans -a unionfs --underlying --no-mount= + +When running + + $ fsysopts + +one will see the information about the `unionfs` translator. Although +this way allows modifying the contents of the unioned filesystem +exported by `unionfs` at runtime, the access to `` is +blocked. + +The filesystem exported by the *mountee* (``) is actually +treated like a normal filesystem within `unionfs`, which means that +one can assign priorities to the *mountee* to achieve the desired +order of layering of the unioned directories. The following will make +`unionfs` query the underlying filesystem first and then the +*mountee*: + + $ settrans -a unionfs --priority=2 --underlying --priority=1 --mount= + +Note that the same functionality can also be achieved by assigning +priority 1 to the underlying filesystem and keeping the priority of +the *mountee* at 0. # `stowfs` ... is a special mode of `unionfs`. -# See Also - - * [[unionmount]] - # External Links * [*Unioning file systems for Linux*](http://valerieaurora.org/union/) diff --git a/hurd/translator/unionmount.mdwn b/hurd/translator/unionmount.mdwn index 47a3d85d..65f09719 100644 --- a/hurd/translator/unionmount.mdwn +++ b/hurd/translator/unionmount.mdwn @@ -8,53 +8,4 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] -[[!meta title="Union Mounts"]] - -When setting a translator on Hurd -- similar to mounting a file system on UNIX --- the new node(s) exported by the translator are obscuring the original node -where the translator is set, and any nodes below it in the directory tree. The -translator itself can access the underlying node (which is a very nice feature, -as it allows translators presenting the contents of the node in a different -format); but it's no longer accessible from the "outside". - -Plan9 has a feature where a file system can be mounted in union mode: the new -file system doesn't obscure the mount point in this case, but instead the -contents are combined. (This feature has also been under discussion in Linux -for a couple of years now, under the label "VFS-based union mounts".) - -This kind of union mounts is generally useful, as it's sometimes more -convenient than unioning existing filesystem locations with unionfs -- it's not -necessary to mount a file system that is to be unioned at some external -location first: just union-mount it directly at the target location. - -But union mounts also allow creating passive translator hierarchies: If there -is a passive translator on a parent node, and further passive translators on -child nodes, the union mount allows the child nodes with the further translator -settings still to be visible after the parent translator has started. - -This could be useful for device nodes for example: let's say we have an -ethernet multiplexer at /dev/veth. Now the virtual subnodes could all be -directly under /dev, i.e. /dev/veth0, /dev/veth1 etc., and explicitely refer to -the main /dev/veth node in the translator command line. It would be more -elegant however to store the virtual nodes direcly below the main multiplexer -node -- /dev/veth/0, /dev/veth/1 etc. - -There are two possible approaches how union mounts could be implemented in the -Hurd. The first one is to let the various translators handle union mounts -internally, i.e. let them present the underlying nodes to the clients in -addition to the actual nodes they export themselfs. This probably can be -implemented as some kind of extension to the existing netfs and diskfs -libraries. - -The other possible apporach is less efficient and probably more tricky, but -probably also more generic: create a special unionmount translator, which -serves as a kind of proxy: setting the union-mounted translator on some -internal node; and at the actual mount location, presenting a union of the -nodes exported by this translator, and the nodes from the underlying file -system. - -The goal of this project is implementing union mounts using either of the -approaches described above. (Though it might be useful initially to prototype -both for comparision.) The ethernet multiplexer shall serve as an example use -case -- any changes necessary to allow using it with the union mount -functionality are also to be considered part of the task. +[[!meta redir=unionfs]] -- cgit v1.2.3 From ed59faf772c24131e60444392b3cadcb9f6cb473 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Mon, 28 Sep 2009 18:18:18 +0300 Subject: Add a warning about the problem with syncing in unionfs. --- hurd/translator/unionfs.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hurd') diff --git a/hurd/translator/unionfs.mdwn b/hurd/translator/unionfs.mdwn index 93a3a385..407fa134 100644 --- a/hurd/translator/unionfs.mdwn +++ b/hurd/translator/unionfs.mdwn @@ -12,6 +12,9 @@ is included in the section entitled Source repository: +Right now there are some problems with syncing, so please be aware +that it might not work as expected. + # `unionmount` ... is a special mode of `unionfs`. -- cgit v1.2.3 From 93ff33abc6c96b5d528030a2fc438b458846ae47 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Tue, 29 Sep 2009 08:35:11 +0200 Subject: unionfs: Added a short note what it does. --- hurd/translator/unionfs.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hurd') diff --git a/hurd/translator/unionfs.mdwn b/hurd/translator/unionfs.mdwn index 407fa134..42ecdce7 100644 --- a/hurd/translator/unionfs.mdwn +++ b/hurd/translator/unionfs.mdwn @@ -10,6 +10,8 @@ is included in the section entitled # `unionfs` +*Unionfs allows you to simply union one directory or translator into another one, so you see the files of both of them side by side.* + Source repository: Right now there are some problems with syncing, so please be aware -- cgit v1.2.3 From 50845c8ca740ce1609d24c8e17dc8196e53aed40 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 29 Sep 2009 21:05:47 +0200 Subject: Tiny improvement w.r.t. unionmount redir. --- hurd/translator.mdwn | 1 - hurd/translator/unionfs.mdwn | 1 + hurd/translator/unionmount.mdwn | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'hurd') diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 4995a005..ea420a72 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -73,7 +73,6 @@ Read about translator [[short-circuiting]]. * [[cvsfs]] * [[tmpfs]] * [[procfs]] -* [[unionmount]] * ... diff --git a/hurd/translator/unionfs.mdwn b/hurd/translator/unionfs.mdwn index 42ecdce7..331ad19f 100644 --- a/hurd/translator/unionfs.mdwn +++ b/hurd/translator/unionfs.mdwn @@ -17,6 +17,7 @@ Source repository: Right now there are some problems with syncing, so please be aware that it might not work as expected. + # `unionmount` ... is a special mode of `unionfs`. diff --git a/hurd/translator/unionmount.mdwn b/hurd/translator/unionmount.mdwn index 65f09719..7384afc7 100644 --- a/hurd/translator/unionmount.mdwn +++ b/hurd/translator/unionmount.mdwn @@ -8,4 +8,4 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] -[[!meta redir=unionfs]] +[[!meta redir=unionfs#unionmount]] -- cgit v1.2.3 From f442694a9ede423aeca68935b0b2679640254f12 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Wed, 30 Sep 2009 18:08:55 +0300 Subject: Added some information about nsmux. --- hurd/translator.mdwn | 1 + hurd/translator/writing/nsmux.mdwn | 106 +++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 hurd/translator/writing/nsmux.mdwn (limited to 'hurd') diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index ea420a72..cfb1f7db 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -73,6 +73,7 @@ Read about translator [[short-circuiting]]. * [[cvsfs]] * [[tmpfs]] * [[procfs]] +* [[nsmux|translator/writing/nsmux]] * ... diff --git a/hurd/translator/writing/nsmux.mdwn b/hurd/translator/writing/nsmux.mdwn new file mode 100644 index 00000000..735c1fde --- /dev/null +++ b/hurd/translator/writing/nsmux.mdwn @@ -0,0 +1,106 @@ +[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU Free Documentation License|/fdl]]."]]"""]] + +# nsmux + +`nsmux` implements the simplest use-case of namespace-based translator +selection (see below). + +## Source + +`nsmux` translator can be obtained with the following command: + + $ git clone git://github.com/scolobb/nsmux.git + +`filter` translator can be obtained with the following command: + + $ git clone git://github.com/scolobb/filter.git + +The filter is not yet working. + +It is highly probable that soon the code will be moved to Savannah. + +## Namespace-based Translator Selection + +Namespace-based translator selection is the special technique of using +"magic" filenames for both accessing the file and setting translators +on it. + +A "magic" filename is a filename which contains an unescaped sequence +of two commas: ",,". This sequence can be escaped by adding another +comma: ",,,". In the magic filename the part up to the first double +commas is interpreted as the filename itself; the remaining segments +into which the string is split by occurrences of ",," are treated as +names of translators located under `/hurd/`. + +The simplest advantage before traditional way of setting +translators is shown in the following examples. Compare this + + $ settrans -a file translator1 + $ settrans -a file translator2 + $ cat file + +to this: + + $ cat file,,translator1,,translator2 + +One simple command versus three more lengthy ones is an obvious +improvement. However, this advantage is not the only one and, +probably, not even the most important. + +What is a good candidate for the most important advantage is that +translators requested via "magic" filenames are session-bound. In +other words, by running `cat file,,translator` we set a translator +visible *only* to `cat`, while the original file remains untranslated. +Such session-specific translators are called **dynamic** and there is +no (theoretical) way for a client to get a port to a dynamic +translator requested by another client. + +Obviously, dynamic translators can be stacked, similarly to static +translators. Also, dynamic translator stacks may reside on top of +static translator stacks. + +An important operation of namespace-based translator selection is +*filtering*. Filtering basically consists in looking up a translator +by name in the stack and ignoring translators located on top of it. +Note that filtering does not mean dropping some translators: in the +current implementation a filter is expected to be a normal dynamic +translator, included in the dynamic translator stack similarly to +other translators. + +An important detail is that filtering is not limited to dynamic +translator stacks: a filter should be able to descend into static +translator stacks as well. + +Although the concept of filtering may seem purely abstract in the +simplest use-case of setting dynamic translators on top of files, the +situation changes greatly when dynamic translator stacks on top of +directories are considered. In this case, the implementation of +namespace-based translator selection is expected to be able to +propagate the dynamic translators associated with the directory down +the directory structure. That is, all files located under a directory +opened with magic syntax, are expected to be translated by the same +set of translators. In this case having the possibility to +specifically discard some of the translators set up on top of certain +files is very useful. + +Note that the implementation of propagation of dynamic translators +down directories is not fully conceived at the moment. The +fundamental problem is distinguishing between situations when the +dynamic translators are to be set on the underlying files of the +directory or on the directory itself. + +## Currently Implemented + +Currently there a working (though not heavily tested) implementation +of the simplest use-case of namespace-based translator selection in +the form of translator `nsmux`. The filter is partially implemented +and this is the immediate goal. Propagating translators down +directories is the next objective. -- cgit v1.2.3 From 1ee04b164bb6c593387500bbf2b0dabeef3a9d36 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Wed, 30 Sep 2009 19:33:28 +0300 Subject: Add the usage information about nsmux. --- hurd/translator/writing/nsmux.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hurd') diff --git a/hurd/translator/writing/nsmux.mdwn b/hurd/translator/writing/nsmux.mdwn index 735c1fde..c07a30bd 100644 --- a/hurd/translator/writing/nsmux.mdwn +++ b/hurd/translator/writing/nsmux.mdwn @@ -13,6 +13,17 @@ is included in the section entitled `nsmux` implements the simplest use-case of namespace-based translator selection (see below). +To use `nsmux` do the following: + + $ settrans -a nsmux + +After this operation `` will be a mirror of `` with +namespace-based translator selection functionality enabled. + +Please note that due to some details `nsmux` may complain a lot when +run as a normal user. This matter is the most urgent on the TODO +list. + ## Source `nsmux` translator can be obtained with the following command: -- cgit v1.2.3 From f85b511c46e479410f310d0763cc8fc4fb79326b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 1 Oct 2009 09:05:16 +0200 Subject: Put nsmux in line with the other translator pages. --- community/gsoc/2008.mdwn | 3 +- hurd/translator.mdwn | 2 +- hurd/translator/nsmux.mdwn | 117 +++++++++++++++++++++++++++++++++++++ hurd/translator/writing/nsmux.mdwn | 117 ------------------------------------- 4 files changed, 120 insertions(+), 119 deletions(-) create mode 100644 hurd/translator/nsmux.mdwn delete mode 100644 hurd/translator/writing/nsmux.mdwn (limited to 'hurd') diff --git a/community/gsoc/2008.mdwn b/community/gsoc/2008.mdwn index d7b467bb..d994f2b0 100644 --- a/community/gsoc/2008.mdwn +++ b/community/gsoc/2008.mdwn @@ -23,7 +23,8 @@ did a great job! vacation). The project however was hampered by various misunderstandings, wrong assumptions, and several major redesigns during the course of the work -- which is probably more our fault than the student's. In the end, though, he - completed nsmux (the main namespace proxy handling the magic filename + completed [[hurd/translator/nsmux]] (the main namespace proxy handling the + magic filename lookups, running dynamic translators on demand); he still works on finishing the translator stack filtering necessary to implement some of the desired functionality (accessing files while skipping existing translators). diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index cfb1f7db..158f53d7 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -73,7 +73,7 @@ Read about translator [[short-circuiting]]. * [[cvsfs]] * [[tmpfs]] * [[procfs]] -* [[nsmux|translator/writing/nsmux]] +* [[nsmux]] * ... diff --git a/hurd/translator/nsmux.mdwn b/hurd/translator/nsmux.mdwn new file mode 100644 index 00000000..c07a30bd --- /dev/null +++ b/hurd/translator/nsmux.mdwn @@ -0,0 +1,117 @@ +[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU Free Documentation License|/fdl]]."]]"""]] + +# nsmux + +`nsmux` implements the simplest use-case of namespace-based translator +selection (see below). + +To use `nsmux` do the following: + + $ settrans -a nsmux + +After this operation `` will be a mirror of `` with +namespace-based translator selection functionality enabled. + +Please note that due to some details `nsmux` may complain a lot when +run as a normal user. This matter is the most urgent on the TODO +list. + +## Source + +`nsmux` translator can be obtained with the following command: + + $ git clone git://github.com/scolobb/nsmux.git + +`filter` translator can be obtained with the following command: + + $ git clone git://github.com/scolobb/filter.git + +The filter is not yet working. + +It is highly probable that soon the code will be moved to Savannah. + +## Namespace-based Translator Selection + +Namespace-based translator selection is the special technique of using +"magic" filenames for both accessing the file and setting translators +on it. + +A "magic" filename is a filename which contains an unescaped sequence +of two commas: ",,". This sequence can be escaped by adding another +comma: ",,,". In the magic filename the part up to the first double +commas is interpreted as the filename itself; the remaining segments +into which the string is split by occurrences of ",," are treated as +names of translators located under `/hurd/`. + +The simplest advantage before traditional way of setting +translators is shown in the following examples. Compare this + + $ settrans -a file translator1 + $ settrans -a file translator2 + $ cat file + +to this: + + $ cat file,,translator1,,translator2 + +One simple command versus three more lengthy ones is an obvious +improvement. However, this advantage is not the only one and, +probably, not even the most important. + +What is a good candidate for the most important advantage is that +translators requested via "magic" filenames are session-bound. In +other words, by running `cat file,,translator` we set a translator +visible *only* to `cat`, while the original file remains untranslated. +Such session-specific translators are called **dynamic** and there is +no (theoretical) way for a client to get a port to a dynamic +translator requested by another client. + +Obviously, dynamic translators can be stacked, similarly to static +translators. Also, dynamic translator stacks may reside on top of +static translator stacks. + +An important operation of namespace-based translator selection is +*filtering*. Filtering basically consists in looking up a translator +by name in the stack and ignoring translators located on top of it. +Note that filtering does not mean dropping some translators: in the +current implementation a filter is expected to be a normal dynamic +translator, included in the dynamic translator stack similarly to +other translators. + +An important detail is that filtering is not limited to dynamic +translator stacks: a filter should be able to descend into static +translator stacks as well. + +Although the concept of filtering may seem purely abstract in the +simplest use-case of setting dynamic translators on top of files, the +situation changes greatly when dynamic translator stacks on top of +directories are considered. In this case, the implementation of +namespace-based translator selection is expected to be able to +propagate the dynamic translators associated with the directory down +the directory structure. That is, all files located under a directory +opened with magic syntax, are expected to be translated by the same +set of translators. In this case having the possibility to +specifically discard some of the translators set up on top of certain +files is very useful. + +Note that the implementation of propagation of dynamic translators +down directories is not fully conceived at the moment. The +fundamental problem is distinguishing between situations when the +dynamic translators are to be set on the underlying files of the +directory or on the directory itself. + +## Currently Implemented + +Currently there a working (though not heavily tested) implementation +of the simplest use-case of namespace-based translator selection in +the form of translator `nsmux`. The filter is partially implemented +and this is the immediate goal. Propagating translators down +directories is the next objective. diff --git a/hurd/translator/writing/nsmux.mdwn b/hurd/translator/writing/nsmux.mdwn deleted file mode 100644 index c07a30bd..00000000 --- a/hurd/translator/writing/nsmux.mdwn +++ /dev/null @@ -1,117 +0,0 @@ -[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU Free Documentation License|/fdl]]."]]"""]] - -# nsmux - -`nsmux` implements the simplest use-case of namespace-based translator -selection (see below). - -To use `nsmux` do the following: - - $ settrans -a nsmux - -After this operation `` will be a mirror of `` with -namespace-based translator selection functionality enabled. - -Please note that due to some details `nsmux` may complain a lot when -run as a normal user. This matter is the most urgent on the TODO -list. - -## Source - -`nsmux` translator can be obtained with the following command: - - $ git clone git://github.com/scolobb/nsmux.git - -`filter` translator can be obtained with the following command: - - $ git clone git://github.com/scolobb/filter.git - -The filter is not yet working. - -It is highly probable that soon the code will be moved to Savannah. - -## Namespace-based Translator Selection - -Namespace-based translator selection is the special technique of using -"magic" filenames for both accessing the file and setting translators -on it. - -A "magic" filename is a filename which contains an unescaped sequence -of two commas: ",,". This sequence can be escaped by adding another -comma: ",,,". In the magic filename the part up to the first double -commas is interpreted as the filename itself; the remaining segments -into which the string is split by occurrences of ",," are treated as -names of translators located under `/hurd/`. - -The simplest advantage before traditional way of setting -translators is shown in the following examples. Compare this - - $ settrans -a file translator1 - $ settrans -a file translator2 - $ cat file - -to this: - - $ cat file,,translator1,,translator2 - -One simple command versus three more lengthy ones is an obvious -improvement. However, this advantage is not the only one and, -probably, not even the most important. - -What is a good candidate for the most important advantage is that -translators requested via "magic" filenames are session-bound. In -other words, by running `cat file,,translator` we set a translator -visible *only* to `cat`, while the original file remains untranslated. -Such session-specific translators are called **dynamic** and there is -no (theoretical) way for a client to get a port to a dynamic -translator requested by another client. - -Obviously, dynamic translators can be stacked, similarly to static -translators. Also, dynamic translator stacks may reside on top of -static translator stacks. - -An important operation of namespace-based translator selection is -*filtering*. Filtering basically consists in looking up a translator -by name in the stack and ignoring translators located on top of it. -Note that filtering does not mean dropping some translators: in the -current implementation a filter is expected to be a normal dynamic -translator, included in the dynamic translator stack similarly to -other translators. - -An important detail is that filtering is not limited to dynamic -translator stacks: a filter should be able to descend into static -translator stacks as well. - -Although the concept of filtering may seem purely abstract in the -simplest use-case of setting dynamic translators on top of files, the -situation changes greatly when dynamic translator stacks on top of -directories are considered. In this case, the implementation of -namespace-based translator selection is expected to be able to -propagate the dynamic translators associated with the directory down -the directory structure. That is, all files located under a directory -opened with magic syntax, are expected to be translated by the same -set of translators. In this case having the possibility to -specifically discard some of the translators set up on top of certain -files is very useful. - -Note that the implementation of propagation of dynamic translators -down directories is not fully conceived at the moment. The -fundamental problem is distinguishing between situations when the -dynamic translators are to be set on the underlying files of the -directory or on the directory itself. - -## Currently Implemented - -Currently there a working (though not heavily tested) implementation -of the simplest use-case of namespace-based translator selection in -the form of translator `nsmux`. The filter is partially implemented -and this is the immediate goal. Propagating translators down -directories is the next objective. -- cgit v1.2.3 From 11d907085b93f3ea972556607658371be5f31507 Mon Sep 17 00:00:00 2001 From: lukeshu Date: Mon, 5 Oct 2009 00:53:58 +0000 Subject: fix markup on link to http://lists.gnu.org/mailman/listinfo/gnu-system-discuss --- hurd/running/gnu/setup.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hurd') diff --git a/hurd/running/gnu/setup.mdwn b/hurd/running/gnu/setup.mdwn index 57a19054..2fb30c7b 100644 --- a/hurd/running/gnu/setup.mdwn +++ b/hurd/running/gnu/setup.mdwn @@ -8,7 +8,7 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] -Setup is very easy (You need a GNU/Linux system to install GNU, we are developing an installer for GNU and if you want to help us join us on [[http://lists.gnu.org/mailman/listinfo/gnu-system-discuss][gnu-system-discuss]]), just follow these steps ... +Setup is very easy (You need a GNU/Linux system to install GNU, we are developing an installer for GNU and if you want to help us join us on [gnu-system-discuss](http://lists.gnu.org/mailman/listinfo/gnu-system-discuss)), just follow these steps ... ## Step 1: Find a home for GNU -- cgit v1.2.3 From f1cc66b89ae0c42a3c85eec0344746e88a09d231 Mon Sep 17 00:00:00 2001 From: lukeshu Date: Mon, 5 Oct 2009 00:58:40 +0000 Subject: spelling fixes --- hurd/running/gnu/create_an_image.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hurd') diff --git a/hurd/running/gnu/create_an_image.mdwn b/hurd/running/gnu/create_an_image.mdwn index 2cdb8e27..c7a97a4e 100644 --- a/hurd/running/gnu/create_an_image.mdwn +++ b/hurd/running/gnu/create_an_image.mdwn @@ -27,7 +27,7 @@ Creating a bootable qemu image from a root filesystem and bootloader create the necessary partitions (root and swap partitions boot, home ... if required) -4. Create a file syatem for the root partiotion +4. Create a file system for the root partition mke2fs /dev/hda1 @@ -39,7 +39,7 @@ Creating a bootable qemu image from a root filesystem and bootloader 6. Copy the file system from the host machine to the mounted directory (use a compressed file system to make the copying faster) - Grab the GNU spapshot from ams' site + Grab the GNU snapshot from ams' site scp @: disk @@ -58,7 +58,7 @@ Creating a bootable qemu image from a root filesystem and bootloader poweroff -10. To make the file syatem bootable download a grub floppy image +10. To make the file system bootable download a grub floppy image -- cgit v1.2.3 From 80edc6ab43ce69dee3e50dddd59784b6102c5d8c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 6 Oct 2009 14:42:43 +0200 Subject: hurd/translator: The (non-)difference between server and translator. --- hurd/translator.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'hurd') diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 158f53d7..e567938f 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -33,6 +33,17 @@ kernel and thus have absolute access to the machine. As the protocols do not require any special privilege to implement, this is not an issue on the Hurd. +In Mach parlance, a *translator* is what they name a *server*: a process that +participates in [[RPC]] interactions. In the Hurd, a translator is a server +that is additionally attached to a filesystem node. Thus, it is quite common, +even in the Hurd context, to speak about *server*s if you're stressing the RPC +part, and on the other hand about *translator*s if you're stressing the +filesystem part: a translator implements the [[interface/fs]] and +[[interface/io]] interfaces. For example: *the [[pfinet]] server implements +the socket API calls (which are mapped by [[glibc]] to equivalent RPC calls)*, +compared to *a [[libdiskfs]]-based translator implements a filesystem, based on +a backing store*. + To learn how to write a translator, read the code! It is well documented, in particular, the header files. The [[Hurd_Hacking_Guide]] also has a tutorial. -- cgit v1.2.3 From 434df18f5ff96012bc81ec5c2639b3bc67fc76b2 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 7 Oct 2009 22:39:05 +0200 Subject: hurd/glibc/internals: New. --- hurd/glibc.mdwn | 5 ++++- hurd/glibc/internals.mdwn | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 hurd/glibc/internals.mdwn (limited to 'hurd') diff --git a/hurd/glibc.mdwn b/hurd/glibc.mdwn index e975a239..454b8e34 100644 --- a/hurd/glibc.mdwn +++ b/hurd/glibc.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -16,3 +17,5 @@ For information about how the glibc integrates into the system, see sections [[Hurd-specific_API]]. [[Debugging_glibc|debugging/glibc]]. + +[[Internals.]] diff --git a/hurd/glibc/internals.mdwn b/hurd/glibc/internals.mdwn new file mode 100644 index 00000000..b5d7354e --- /dev/null +++ b/hurd/glibc/internals.mdwn @@ -0,0 +1,11 @@ +[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +Some bits about this, some bits about that. -- cgit v1.2.3 From 89f832efb353132ec8374af73ed35231a4d20288 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 7 Oct 2009 22:44:26 +0200 Subject: hurd/glibc/internals: Information by Roland McGrath, bug-hurd, 2009-10-06, <20091006220809.84D691C2EB@topped-with-meat.com>. --- hurd/glibc/internals.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hurd') diff --git a/hurd/glibc/internals.mdwn b/hurd/glibc/internals.mdwn index b5d7354e..2ced0543 100644 --- a/hurd/glibc/internals.mdwn +++ b/hurd/glibc/internals.mdwn @@ -9,3 +9,13 @@ is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] Some bits about this, some bits about that. + +--- + +Hurd controlling tty behavior is generally consistent with BSD's, including +`TIOCSCTTY`. Linux also has `TIOCSCTTY` and it is harmless to use it there. +But BSD and Hurd never do an implicit `TIOCSCTTY` (hence our `O_NOCTTY` is +zero). + +C.f. and the +following messages. -- cgit v1.2.3 From e5ae3d177e3723d5a6aecf00c87a7f0e7f81818a Mon Sep 17 00:00:00 2001 From: lukeshu Date: Sun, 11 Oct 2009 16:43:26 +0000 Subject: spelling: `traing' -> `trailing' --- hurd/running/debian/faq/apt_umount.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hurd') diff --git a/hurd/running/debian/faq/apt_umount.mdwn b/hurd/running/debian/faq/apt_umount.mdwn index f2889f3e..db0dbfd1 100644 --- a/hurd/running/debian/faq/apt_umount.mdwn +++ b/hurd/running/debian/faq/apt_umount.mdwn @@ -22,4 +22,4 @@ Give executable permission to the script. # chmod +x /usr/bin/umount In `/etc/fstab` add a trailing `/` after cdrom like `/cdrom/` since apt uses a -traing `/`. +trailing `/`. -- cgit v1.2.3 From c2724866ae27469c32ac4c123c4fe727927d52f6 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 13 Oct 2009 00:43:33 +0200 Subject: hurd/debugging/rpctrace: bug #20612 is fixed. --- hurd/debugging/rpctrace.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hurd') diff --git a/hurd/debugging/rpctrace.mdwn b/hurd/debugging/rpctrace.mdwn index 63b72ee0..46f40508 100644 --- a/hurd/debugging/rpctrace.mdwn +++ b/hurd/debugging/rpctrace.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -24,7 +25,6 @@ See `rpctrace --help` about how to use it. * -- terminated with `C-c` `rpctrace`d programs hang * -- more readable output -* -- heisenbug # TODO -- cgit v1.2.3