tech-userlevel archive

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

Re: datagram vs stream sockets



Matthew Mondor <mm_lists%pulsar-zone.net@localhost> wrote:

> Is this a "bug" inherent to the way FUSE itself works?  Or an artifact
> of some FS-specific code used with FUSE?  Or really introduced by the
> perfused(8) client-server protocol?

I think it is introduced by perfused(8).

On Linux, FUSE filesystems open a character device (/dev/fuse). We try
to emulate this on NetBSD, with perfused(8) creating a /dev/fuse socket.

The FUSE filesystem open("/dev/fuse") is hijacked as a
socket()/bind()/connect() by #include <perfuse.h> and linking with
-lperfuse.  

I hoped I would not have to hijack read() and write() too, but it might
be necessary.

> I don't immediately understand the problem with fork(2)+SOCK_DGRAM
> sockets.

The problem is not with the fork itself, but with the idea of having
each perfused process talking to its own FUSE filesystem.

With SOCK_DGRAM, there is no accept() call. Therefore, if I have
multiple filesystems, I have no way of sending the data to a given one
and not the others.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index