lkml.org 
[lkml]   [2014]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/5] fuse: handle release synchronously (v4)
On Tue, Sep 30, 2014 at 12:04:08PM -0700, Linus Torvalds wrote:
> On Mon, Sep 29, 2014 at 10:33 PM, Anand Avati <avati@gluster.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.

What about flock(2), FL_SETLEASE, etc semantics (which are the sane ones,
compared to the POSIX locks shit which mandates release of lock on each close(2)
instead of "when all [duplicate] descriptors have been closed")?

You have to do that from ->release(), there's no question about that. And while
I haven't looked at the wording of the standards, doing that synchronously with
the last close is a pretty decent thing to expect.

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-09-30 22:01    [W:0.367 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site