From: Maxim Patlasov <mpatlasov@parallels.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel <fuse-devel@lists.sourceforge.net>,
Anand Avati <avati@gluster.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/6] fuse: fix synchronous case of fuse_file_put()
Date: Thu, 11 Sep 2014 20:14:07 +0400 [thread overview]
Message-ID: <5411CA4F.7040006@parallels.com> (raw)
In-Reply-To: <CAJfpegsWoaqR1vQRq8QpYdwUX9Ace9XTe77eOkOUy2VyHUeEdQ@mail.gmail.com>
On 08/22/2014 06:08 PM, Miklos Szeredi wrote:
> On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov <MPatlasov@parallels.com> wrote:
>> If fuse_file_put() is called with sync==true, the user may be blocked for
>> a while, until userspace ACKs our FUSE_RELEASE request. This blocking must be
>> uninterruptible. Otherwise request could be interrupted, but file association
>> in user space remains.
>>
>> Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
>> ---
>> fs/fuse/file.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
>> index cd55488..b92143a 100644
>> --- a/fs/fuse/file.c
>> +++ b/fs/fuse/file.c
>> @@ -136,6 +136,10 @@ static void fuse_file_put(struct fuse_file *ff, bool sync)
>> path_put(&req->misc.release.path);
>> fuse_put_request(ff->fc, req);
>> } else if (sync) {
>> + /* Must force. Otherwise request could be interrupted,
>> + * but file association in user space remains.
>> + */
>> + req->force = 1;
>> req->background = 0;
>> fuse_request_send(ff->fc, req);
>> path_put(&req->misc.release.path);
>>
>
> Some thought needs to go into this: if RELEASE is interrupted, then
> we should possibly allow that, effectively backgrounding the request.
>
> The synchronous nature is just an optimization and we really don't
> know where we are being interrupted, possibly in a place which very
> much *should* allow interruption.
I really need your help to proceed with this patch. Could you please
explain what those places are where we should allow interruption.
BTW, as for "just an optimization", I've recently noticed that __fput()
calls locks_remove_file(). So guarantees provided by the patch-set are
on the same level as flock(2) behaviour.
>
> Also fuse really should distinguish fatal and non-fatal interruptions
> and handle them accordingly...
And elaborate on this concern, please.
Thanks,
Maxim
next prev parent reply other threads:[~2014-09-11 16:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 16:07 [PATCH 0/6] fuse: handle release synchronously (v3) Maxim Patlasov
2014-08-21 16:08 ` [PATCH 1/6] fuse: add FOPEN_SYNC_RELEASE flag to ff->open_flags Maxim Patlasov
2014-08-21 16:08 ` [PATCH 2/6] fuse: cosmetic rework of fuse_send_readpages Maxim Patlasov
2014-08-21 16:08 ` [PATCH 3/6] fuse: wait for end of IO on release Maxim Patlasov
2014-08-22 14:00 ` Miklos Szeredi
2014-08-25 15:12 ` Maxim Patlasov
2014-08-26 8:42 ` [PATCH 3/6] fuse: wait for end of IO on release (v2) Maxim Patlasov
2014-08-21 16:09 ` [PATCH 4/6] fuse: enable close_wait synchronous release Maxim Patlasov
2014-08-22 14:04 ` Miklos Szeredi
2014-08-25 15:27 ` Maxim Patlasov
2014-08-21 16:09 ` [PATCH 5/6] fuse: fix synchronous case of fuse_file_put() Maxim Patlasov
2014-08-22 14:08 ` Miklos Szeredi
2014-08-25 15:58 ` Maxim Patlasov
2014-09-11 16:14 ` Maxim Patlasov [this message]
2014-09-16 8:19 ` Miklos Szeredi
2014-09-24 7:19 ` Maxim Patlasov
2014-08-21 16:09 ` [PATCH 6/6] fuse: add mount option to disable synchronous release Maxim Patlasov
2014-08-22 14:09 ` Miklos Szeredi
2014-08-22 18:10 ` [fuse-devel] " Anand Avati
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=5411CA4F.7040006@parallels.com \
--to=mpatlasov@parallels.com \
--cc=avati@gluster.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.