[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] [PATCH] fuse: remove WARN_ON writeback on dead inode
From:       Maxim Patlasov <mpatlasov () parallels ! com>
Date:       2014-08-13 8:35:52
Message-ID: 53EB2368.8060507 () parallels ! com
[Download RAW message or body]

Hi Miklos,

On 08/12/2014 04:29 PM, Miklos Szeredi wrote:
> On Mon, Jul 28, 2014 at 2:58 PM, Maxim Patlasov <mpatlasov@parallels.com> wrote:
>
>> No, it is not undefined behaviour. munmap(2) flushes changes as well.
>> See munmap(2) man page.
> This is an ugly corner case: one thread is happily reading into memory
> that another thread is doing munmap(2) on.

What made you think that my comment referred to that ugly corner case? 
Goswin's question was exactly the following:

> Lets assume you have the file mmap()ed, you write to it so pages
> become dirty and you munmap() it so no file is open for write for the
> dirty pages anymore. What should then happen?

And my point was that one is not obliged to call msync there, because 
munmap flushes changes anyway.

>
> The behavior *is* undefined, no standard talks about this specific
> case and whether the read should succeed or fail with EFAULT.  I think
> both are  right, but I also think that if the read doens't fail then
> we shouldn't loose the data despite racing with munmap.
>
> But no sane application does the above, so practically it's a
> non-issue.  And since there doesn't appear to be an easy solution, we
> might just have to live with this, rather theoretical, data loss
> scenario.

Yes, I completely agree, but these considerations seem to be unrelated 
either to initial patch or Goswin's question.

Btw, will you provide any feedback about the following patches:

http://sourceforge.net/mailarchive/message.php?msg_id=32412492
http://sourceforge.net/mailarchive/message.php?msg_id=32427155
http://sourceforge.net/mailarchive/message.php?msg_id=32427156
http://sourceforge.net/mailarchive/message.php?msg_id=32427157
http://sourceforge.net/mailarchive/message.php?msg_id=32427158
http://sourceforge.net/mailarchive/message.php?msg_id=32427159
http://sourceforge.net/mailarchive/message.php?msg_id=32427175

I posted them a few months ago any you have probably had some time to 
review them. Any feedback would be highly appreciated.

Thanks,
Maxim

------------------------------------------------------------------------------
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic