linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Oleg Chernovskiy <kanedias@xaker.ru>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: FUSE: write() after release()
Date: Mon, 17 Sep 2018 09:13:10 +0200	[thread overview]
Message-ID: <CAJfpegueWy9swz8AcrkNCdff9NxhTORno7ddoCb3Fi2caTWmQA@mail.gmail.com> (raw)
In-Reply-To: <5c7118c8-7504-6f6a-1402-9c9c02c2f2c7@xaker.ru>

On Sun, Sep 16, 2018 at 12:35 AM, Oleg Chernovskiy <kanedias@xaker.ru> wrote:
> Hi,
>
>
> I'm writing primarily because of the bug users are reporting
>
> in my network-based filesystem [1]. In short, rsync first creates temporary file,
>
> flushes and closes it and then immediately opens it again. The problem is,
>
> sometimes I see that afterwards it tries to write to a closed fd resulting in IO error.
>
>
> Is there a possibility that FUSE can execute fresh OPEN call before pending RELEASE
>
> for the same inode that was processed?

Yes.

>
>
> I see OPEN calls are always sync in fuse_open_common but RELEASE seems to be
>
> async as I see it goes to background queue in
>
> fuse_release_common->fuse_file_put->fuse_request_send_background, can this be the reason?

Right.

>
>
> Is there something that I'm missing? Maybe it's me implementing fs in wrong way?
>
> How is this kind of behavior is corrected?

I don't quite get what the problem is.   The filesystem needs to
handle multiple parallel open instances of the same inode anyway.
What's special about this case of two slightly overlapping open
instances as opposed to two fully overlapping open instances?

Thanks,
Miklos

  reply	other threads:[~2018-09-17 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-15 22:35 FUSE: write() after release() Oleg Chernovskiy
2018-09-17  7:13 ` Miklos Szeredi [this message]
     [not found]   ` <648A0C2F-7AB6-43D5-82DB-747B1C0E0F16@xaker.ru>
2018-09-17  7:39     ` 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=CAJfpegueWy9swz8AcrkNCdff9NxhTORno7ddoCb3Fi2caTWmQA@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=kanedias@xaker.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).