[Top][All Lists]

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

Re: How to stack libtrivfs-based translators

From: Sergiu Ivanov
Subject: Re: How to stack libtrivfs-based translators
Date: Wed, 23 Jul 2008 12:24:31 +0300

On Thu, Jul 17, 2008 at 3:33 PM, Sergiu Ivanov <unlimitedscolobb@gmail.com> wrote:
On Wed, Jul 16, 2008 at 2:32 AM, <olafBuddenhagen@gmx.net> wrote:
On Tue, Jul 15, 2008 at 06:10:02PM +0300, Sergiu Ivanov wrote:
> I have written a libtrivfs-based translator (the source code is
> supplied in the attachment), however I have problems with stacking it
> upon itself.
> If I now try to stack mangle upon foo again, using the command:
>   settrans -L foo mangle
> I receive the following error message:
>   settrans: foo: Operation not supported

This requires certain RPCs in fs.defs (and probably fsys.defs) to be
implemented, most notably file_set_translator. A quick look at
file-set-translator.c from libtrivfs shows us that
trivfs_S_file_set_translator() is "implemented" as

  { return EOPNOTSUPP; }

i.e. it's not implemented at all.

In other words, libtrivfs doesn't seem to support setting further
translators on the translated node out of the box. (I think you could
implement it manually, though...)

I forgot to mention: I've already tried implementing the callback
trivfs_S_file_set_translator in the following way:

  {return 0;}

In this case settrans -aL mangle does not complain and I even get two
processes called 'mangle'. However, the process which appears after
settrans -aL mangle seems to be ignored. I mean that the command

  cat foo

still prints the contents of 'foo' translated only by *one*
mangle. From the debug log I can see that the mangle translator
process started by settrans -aL mangle does get the right port to the
underlying node (at least, the inode reported by io_stat is
correct). However, cat foo triggers the corresponding callbacks only
in the first instance of mangle.

I supply the new code in the attachment.


Attachment: mangle.c
Description: Text Data

reply via email to

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