On 2015-11-29 at  7:30 'Davide Libenzi' via Akaros wrote:
> Kind of a mess, yeah. That makes std Unix VFS look like Christmas 😀
> OK, so, to create my ->aux context, don't I have to hook into
> ->open()? attach() and walk() instead?

Ah, your case is actually a lot easier than the walk/attach case.  I
got sidetracked a bit.  =)

All chans that have been opened by your open() will also be closed by
your close(). 

In your open, be sure to set c->flags |= COPEN.  In your close(), check
for COPEN, and if set, then you can clean up c->aux.  

Your chan is also unique and will remain so once you set COPEN.  For
instance, we'll panic if someone tries to devclone() a COPEN'd chan.
(It's a 9ns bug if that happens, so the user shouldn't be able to
trigger it).

Barret

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to