From: Jeff Dike <jdike@addtoit.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] Add O_NONBLOCK support to FUSE
Date: Tue, 28 Feb 2006 21:29:44 -0500 [thread overview]
Message-ID: <20060301022944.GB9624@ccure.user-mode-linux.org> (raw)
This adds O_NONBLOCK support to FUSE.
I don't like duplicating the connected and list_empty tests in
fuse_dev_readv, but this seemed cleaner than adding the f_flags test
to request_wait.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Index: host-2.6.15-fuse/fs/fuse/dev.c
===================================================================
--- host-2.6.15-fuse.orig/fs/fuse/dev.c 2006-02-28 21:00:00.000000000 -0500
+++ host-2.6.15-fuse/fs/fuse/dev.c 2006-02-28 21:04:36.000000000 -0500
@@ -613,6 +613,12 @@ static ssize_t fuse_dev_readv(struct fil
err = -EPERM;
if (!fc)
goto err_unlock;
+
+ err = -EAGAIN;
+ if((file->f_flags & O_NONBLOCK) && fc->connected &&
+ list_empty(&fc->pending))
+ goto err_unlock;
+
request_wait(fc);
err = -ENODEV;
if (!fc->connected)
next reply other threads:[~2006-03-01 2:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-01 2:29 Jeff Dike [this message]
2006-03-01 9:51 ` [PATCH] Add O_NONBLOCK support to FUSE Miklos Szeredi
2006-03-02 18:04 ` Jeff Dike
2006-03-02 19:56 ` Miklos Szeredi
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=20060301022944.GB9624@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).