[Top][All Lists]

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

Re: ShadowFS (status)

From: Marcus Brinkmann
Subject: Re: ShadowFS (status)
Date: Thu, 2 Aug 2001 18:07:35 +0200
User-agent: Mutt/1.3.18i

On Thu, Aug 02, 2001 at 03:15:38PM +0200, Moritz Schulte wrote:
> It's netfs_attempt_lookup() job to find out, which file (in string
> form) the user wants and which file (port) the user gets. This port
> has to be stored somewhere, assigned to that access - but where?

What is wrong with storing it in the struct netnode?
(Out of the blue).
> Since a 'struct iouser *' is passed to all the netfs callbacks, i
> though about storing this port to the backend file in the 'hook' of
> 'struct iouser'. But, this seems ugly to me.

A struct iouser identifies a user, not an opened file.  struct peropen is
what is created for each opened file, and this in libnetfs points to a
struct node and this in turn to a struct netnode.

> Furthermore, there are no
> user-defined callbacks which can be called to correctly dealloc the
> port and free the hook.

For netnode, this is netfs_node_norefs()

>From a quick glance it appears that you create a hierarchy of netnodes to
represent something like the shadowed filesystem hierarchy.  However, the
directory hierarchy is transient, as you noticed.  So the path names you
store in the netnode may become invalid or change.  I have not pondered
shadowfs details at all, so I might be wrong, but it seems to me that you
want to create netnodes and nodes only for opened files, and not store the
filename in a netnode, but a port to the real file. Then you can also
correctly implement netfs_node_norefs() ;)


`Rhubarb is no Egyptian god.' Debian
Marcus Brinkmann              GNU

reply via email to

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