lkml.org 
[lkml]   [2017]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] afs: Fixes
On Sat, Nov 25, 2017 at 10:35:43PM +0000, David Howells wrote:
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> > So I see in the commit message why afs needs to do this, but it's
> > worth pointing out that it's
> >
> > (a) impossible to avoid the "inconsistent data" case for writable mmap'ed
> > pages
>
> Doesn't clear_page_dirty_for_io() write-protect the PTE for the page to be
> written out, in which case ->page_mkwrite() will get called again before the
> page is redirtied?

Yes, but page_mkwrite will only block on writeback in progress is if
the backing device says it needs stable pages. See
wait_for_stable_page(). e.g. stable pages are required if RAID is
in use, otherwise modification during IO can result in broken
on-disk parity/mirroring....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com

\
 
 \ /
  Last update: 2017-11-25 23:48    [W:0.054 / U:2.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site