lkml.org 
[lkml]   [2014]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/5] fuse: handle release synchronously (v4)
From
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/) 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


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