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 19:32:04 +0900 [thread overview]
Message-ID: <49F043A4.2060700@kernel.org> (raw)
In-Reply-To: <E1LwvrC-00068P-5r@pomaz-ex.szeredi.hu>
Hello,
Miklos Szeredi wrote:
> VFS inode should never be needed by the CUSE codepaths. Well, maybe
> for setting access/modification times, but in any case those need not
> be shared with fuse code.
One more usage: locking.
>>> 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.
>
> I think it's an unnecessary complication. Threads are useful if
> something needs to be _done_, but in this case nothing is done, just
> waiting for the reply. One example why I find it hackish is that you
> are returning error values from the thread, as if it was a synchronous
> thing, but those errors are obviously lost.
That doesn't have anything to do with whether it's done in kernel
thread or not. If that bothers you, just make it return 0 with
comment /* return value ignored */.
> I don't see any problems with doing the device initialization in the
> context of the replying process (which will usually be the same as
> the one opening the device anyway).
I don't know. If it's simple, sure why not. If it makes things even
marginally more complex (state saving and so on), why go that way?
In my first job, I used to work on a quite complex state machine based
server which had to do almost everything in multiple functions. In
the end, it was extremely ugly and ultimately the wrong kind of
optimization, so I much prefer having a stack whenever it makes things
simpler and the overhead isn't an issue. What are the actual benefits
of doing things in several different functions in this case?
Performance definitely is not a concern here.
>> We can surely fold FUSE_INIT inside FUSE_INIT tho but
>> one way or the other doesn't make whole lot of difference.
>
> I just think it would be cleaner, both code-wise and protocol-wise. I
> can do the above cleanups if you have no objection.
Sure, if you think things would be better that way. Please go ahead.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-04-23 10:32 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
2009-04-23 10:08 ` Miklos Szeredi
2009-04-23 10:32 ` Tejun Heo [this message]
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=49F043A4.2060700@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox