[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwqAOGbQ-LYmD-aSALTyA0p9=0vNdsJWd+uweUQyzsW8w@mail.gmail.com>
Date: Tue, 30 Sep 2014 12:04:08 -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/)
>From a quick look at that thread, the solution is clear: you *must*
flush your write buffers in the "flush" function.
The fact that you must flush write buffers multiple times if people
have done "dup()" is a complete non-issue. Just flush them each time.
There is no "how do I differentiate the first flush and
the second flush?" The answer is that you don't, and that you MUST
NOT. You need to flush on both (or more). Trying to distinguish first
vs second is broken, and would be wrogn *anyway*. There is no possible
situation where it could validaly matter, and you simply cannot tell.
Don't do any data structure cleanups, that's for "release()". But yes,
you do have to flush write buffers at flush time (and return IO errors
if they happen). That's very much the point of flush.
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