[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwuit+5j2=k2Ks+um+ooH_iyX1pWCMEx==dw2r_4N2ouA@mail.gmail.com>
Date: Tue, 30 Sep 2014 11:22:56 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Anand Avati <avati@...ster.org>
Cc: Maxim Patlasov <MPatlasov@...allels.com>,
Miklos Szeredi <miklos@...redi.hu>,
"open list:FUSE: FILESYSTEM..." <fuse-devel@...ts.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/5] fuse: handle release synchronously (v4)
On Mon, Sep 29, 2014 at 10:33 PM, Anand Avati <avati@...ster.org> wrote:
>
> In general that sounds reasonable. The problem (as described in the original
> thread, at http://sourceforge.net/p/fuse/mailman/message/29889055/) happens
> in the presence of dup(). Tools like dd (and others) call dup(), and a
> second file descriptor is created for the same filp. Every descriptor's
> close() results in a ->flush(). The final close() of course results in
> ->release() as well.
The thing is, that final close() does not AT ALL "of course result in
->release() as well".
There are any number of things that can delat that release. Not just
mmap(), but simply things like some other process looking at the file
descriptor in /proc.
So I agree that flush can - and will - be called multiple times. So
what? That's the only thing you have if you want something
*synchronous*. Really.
fput() is not synchronous, and never will be. End of discussion. If
you think it is, you are wrong. If you try to make it so, you're
making things worse. Really. Really really.
Real filesystems handle this flush vs release difference well. If
yours does not, yours is broken. Understand that.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists