All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-kernel@vger.kernel.org, fuse-devel@lists.sourceforge.net
Subject: Re: [PATCHSET] CUSE: implement CUSE, take #3
Date: Thu, 23 Apr 2009 09:09:13 +0900	[thread overview]
Message-ID: <49EFB1A9.3060503@kernel.org> (raw)
In-Reply-To: <E1Lwanr-00041r-RP@pomaz-ex.szeredi.hu>

Hello,

Miklos Szeredi wrote:
> Hello Tejun,
> 
> Sorry for the delay, I was busy reimplementing some of the stuff in
> your patchset.  The current state is here:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git cuse-test
> 
>   http://git.kernel.org/?p=linux/kernel/git/mszeredi/fuse.git;a=shortlog;h=cuse-test
> 
> What I changed (IIRC):
> 
>  - Don't store pointer to struct inode, struct fuse_inode, and struct
>    file in struct fuse_file.  Instead store nodeid in struct
>    fuse_file, no worries about object lifetimes this way.

Hmm... there really isn't any object lifetime issue with or without
the pointers as both fuse_file and fuse_inode follow VFS lifetime
rules.  I tried several different approaches including adding nodeid
but what pushed me toward adding the pointers was that the parameter
passing and which uses/depends on what becomes a bit too complex with
other approaches.  e.g. How do you discern between needing vfs inode
and fuse inode?

>  - Don't implement fsync and flush in CUSE, they don't really make
>    sense on character devices.  At least I can't think of any use for
>    them.
>  - release() in CUSE can be synchronous.  Asynchronous release causes
>    many headaches in fuse, but is necessary due to the possible DoS
>    that an unprivileged filesystem could do with an unrelated process.
>    Since CUSE servers are always privileged, this should not be an
>    issue.

Cool.

>  - Other cleanups.
> 
> I still think that the INIT sequence in CUSE is way too complicated
> and that the kernel thread is unnecessary.  How about doing the init
> with a single CUSE_INIT message which embeds the fuse_init_in and
> fuse_init_out structures.

I don't see why the kernel thread is such a big problem.  It's just a
kernel thread.  We can surely fold FUSE_INIT inside FUSE_INIT tho but
one way or the other doesn't make whole lot of difference.

> I also don't see the purpose of the CUSE_INIT_DONE message.  Isn't
> it enough not to send any other messages while the initialization is
> not complete?  This is what fuse does.

The difference between FUSE and CUSE in this regard is that the
synchornous part of initialization is much less for CUSE.  ie. For
FUSE, after the mount is complete, all accesses go to FUSE, so it's
all good.  However, for CUSE, the device nodes are setup
asynchronously, so there's no such inherent synchronization point as
mount.  This becomes a problem when CUSE is started from modprobe to
emulate devices on demand because modprobe should not return before
the device nodes are setup.

Thanks.

-- 
tejun

  reply	other threads:[~2009-04-23  0:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  1:54 [PATCHSET] CUSE: implement CUSE, take #3 Tejun Heo
2009-04-14  1:54 ` [PATCH 1/6] FUSE: misc cleanups Tejun Heo
2009-04-14  1:54 ` [PATCH 2/6] FUSE: use fuse objects as the main objects in file handling functions Tejun Heo
2009-04-14  1:54 ` [PATCH 3/6] FUSE: make ff->fi optional Tejun Heo
2009-04-14  1:54 ` [PATCH 4/6] FUSE: update fuse_conn_init() and separate out fuse_conn_kill() Tejun Heo
2009-04-14  1:54 ` [PATCH 5/6] FUSE: export symbols to be used by CUSE Tejun Heo
2009-04-14  1:54 ` [PATCH 6/6] CUSE: implement CUSE - Character device in Userspace Tejun Heo
2009-04-21 16:43 ` [PATCHSET] CUSE: implement CUSE, take #3 Tejun Heo
2009-04-22 11:39 ` Miklos Szeredi
2009-04-23  0:09   ` Tejun Heo [this message]
2009-04-23 10:08     ` Miklos Szeredi
2009-04-23 10:32       ` Tejun Heo
2009-04-28 15:43         ` Miklos Szeredi
2009-04-30  2:10           ` Tejun Heo
2009-04-30  2:13             ` Tejun Heo
2009-05-06  9:33               ` Miklos Szeredi
2009-05-08 23:35                 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49EFB1A9.3060503@kernel.org \
    --to=tj@kernel.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.