mtab translator (v4)

2013-07-30 Thread Justus Winter
Hi folks :) this is the fourth version of my mtab patch series. I consider it feature complete. Notable changes: * Deadname notifications for translators now work on libnetfs. * The path in peropen structs is updated if a node is moved. * Lot's of cleanups, comments, updated copyright years... *

[PATCH 02/16] libnetfs: handle dead-name notifications

2013-07-30 Thread Justus Winter
Handle dead-name notifications the same way libdiskfs does. In fact, dead-name.c is a verbatim copy with trivial modifications. It clears np->sockaddr if the dead name notification was for that port. * libnetfs/dead-name.c: New file. * libnetfs/Makefile (OTHERSRCS): Add dead-name.c. --- libnetfs/

[PATCH 01/16] libnetfs: implement file_get_translator_cntl

2013-07-30 Thread Justus Winter
This is a trivially adapted version of libdiskfs/file-get-transcntl.c. * libnetfs/file-get-transcntl.c: New file. --- libnetfs/Makefile |2 +- libnetfs/file-get-transcntl.c | 52 + libnetfs/fsstubs.c|8 --- 3 files chan

[PATCH 05/16] libfshelp: add translator-list.c

2013-07-30 Thread Justus Winter
Add functions that maintain a list of active translators. * libfshelp/translator-list.c: New file. * libfshelp/fshelp.h: Add function declarations. * libfshelp/Makefile: Add translator-list.c, link against libihash. --- libfshelp/Makefile |3 +- libfshelp/fshelp.h | 33 +++

[PATCH 03/16] libdiskfs: track file name in struct peropen

2013-07-30 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libdiskfs/diskfs.h (struct peropen): New field path. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path. * libdiskfs/fsys-getroot.c (diskfs_S

[PATCH 06/16] libdiskfs: add fsys_get_children

2013-07-30 Thread Justus Winter
Keep track of active translators and handle fsys_get_children requests. * libdiskfs/Makefile (FSYSSRCS): Add fsys-get-children.c. * libdiskfs/dead-name.c (ports_dead_name): Remove dead translators. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Register active translators. * libdis

[PATCH 07/16] libnetfs: add fsys_get_children

2013-07-30 Thread Justus Winter
Keep track of active translators and handle fsys_get_children requests. * libnetfs/Makefile (FSYSSRCS): Add fsys-get-children.c. * libnetfs/dead-name.c (ports_dead_name): Remove dead translators. * libnetfs/file-set-translator.c (netfs_S_file_set_translator): Register active translators. * libne

[PATCH 04/16] libnetfs: track file name in struct peropen

2013-07-30 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libnetfs/netfs.h (struct peropen): New field path. * libnetfs/make-peropen.c (netfs_make_peropen): Initialize path. * libnetfs/release-peropen.c (netfs_release_peropen): Free path. * libnetfs/fsys-getroot.c (netfs_S_fsys

[PATCH 08/16] libtrivfs: add fsys_get_children

2013-07-30 Thread Justus Winter
Create a server function returning EOPNOTSUPP. * libtrivfs/fsys-get-children.c: New file. --- libtrivfs/Makefile|3 ++- libtrivfs/fsys-get-children.c | 35 +++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 libtrivfs/fsys-get

[PATCH 12/16] libnetfs: add fsys_get_source

2013-07-30 Thread Justus Winter
Add a user overridable function netfs_get_source with a default implementation returning EOPNOTSUPP. Add a server function for fsys-get-source. * libnetfs/Makefile: Add fsys-get-source.c and get-source.c * libnetfs/netfs.h: Add netfs_get_source. * libnetfs/fsys-get-source.c: New file. * libnetfs/g

[PATCH 14/16] trans/symlink.c: add fsys_get_source

2013-07-30 Thread Justus Winter
Create a server function returning EOPNOTSUPP. * trans/symlink.c (S_fsys_get_source): New function. --- trans/symlink.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 30b9712..5ccac6d 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -229

[PATCH 11/16] libdiskfs: add fsys_get_source

2013-07-30 Thread Justus Winter
Add a user overridable function diskfs_get_source with a default implementation returning EOPNOTSUPP. Add a server function for fsys-get-source. * libdiskfs/Makefile: Add fsys-get-source.c and get-source.c * libdiskfs/diskfs.h: Add diskfs_get_source. * libdiskfs/fsys-get-source.c: New file. * libd

[PATCH 15/16] hurd: add fsys_get_source

2013-07-30 Thread Justus Winter
Return information about the source of the receiving filesystem. If the concept of a source is applicable, SOURCE should refer to the source of the receiving translator and should be a description considered appropriate in the context of the translator. For example for the case of block device bas

[PATCH 09/16] trans/symlink.c: add fsys_get_children

2013-07-30 Thread Justus Winter
Create a server function returning EOPNOTSUPP. * trans/symlink.c (S_fsys_get_children): New function. --- trans/symlink.c |8 1 file changed, 8 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 03b5100..30b9712 100644 --- a/trans/symlink.c +++ b/trans/symlink.c @@ -

[PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Justus Winter
fsys_get_children returns any active translators bound to nodes of the receiving filesystem as an argz vector containing file names relative to the root of the receiving translator. * hurd/fsys.defs: Add fsys_get_children. * hurd/fsys_reply.defs: Add fsys_get_children. --- hurd/fsys.defs |

[PATCH 13/16] libtrivfs: add fsys_get_source

2013-07-30 Thread Justus Winter
* libtrivfs/Makefile: Add fsys-get-source.c and get-source.c * libtrivfs/trivfs.h: Add trivfs_get_source. * libtrivfs/fsys-get-source.c: New file. * libtrivfs/get-source.c: Likewise. --- libtrivfs/Makefile |4 ++-- libtrivfs/fsys-get-source.c | 33 +

[PATCH 16/16] trans: add mtab translator

2013-07-30 Thread Justus Winter
The mtab translator provides an mtab file that is dynamically created on demand. It is populated with information about active translators bound below the given path that is accumulated by traversing the translator tree. It can also be invoked as normal program that prints the requested information

Re: [PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Neal H. Walfield
At Tue, 30 Jul 2013 11:59:18 +0200, Justus Winter wrote: > > fsys_get_children returns any active translators bound to nodes of the > receiving filesystem as an argz vector containing file names relative > to the root of the receiving translator. What if the caller is chrooted? The filenames sho

Re: [PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Richard Braun
On Tue, Jul 30, 2013 at 12:20:32PM +0200, Neal H. Walfield wrote: > > fsys_get_children returns any active translators bound to nodes of the > > receiving filesystem as an argz vector containing file names relative > > to the root of the receiving translator. > > What if the caller is chrooted? T

Re: [PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Neal H. Walfield
At Tue, 30 Jul 2013 22:44:22 +0200, Richard Braun wrote: > > On Tue, Jul 30, 2013 at 12:20:32PM +0200, Neal H. Walfield wrote: > > > fsys_get_children returns any active translators bound to nodes of the > > > receiving filesystem as an argz vector containing file names relative > > > to the root

Re: [PATCH 10/16] hurd: add fsys_get_children

2013-07-30 Thread Richard Braun
On Tue, Jul 30, 2013 at 10:50:51PM +0200, Neal H. Walfield wrote: > I'm not concerned about the mtab implementation. I'm concerned about > the RPC's interface. > > I'm not sure why you think chroot is only for compatibility and why we > therefore shouldn't correctly support it. First, it's not P