From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f178.google.com ([209.85.223.178]:39896 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbdKYSFT (ORCPT ); Sat, 25 Nov 2017 13:05:19 -0500 MIME-Version: 1.0 In-Reply-To: <26247.1511533324@warthog.procyon.org.uk> References: <26247.1511533324@warthog.procyon.org.uk> From: Linus Torvalds Date: Sat, 25 Nov 2017 08:05:18 -1000 Message-ID: Subject: Re: [GIT PULL] afs: Fixes To: David Howells Cc: linux-afs@vger.kernel.org, linux-fsdevel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 24, 2017 at 4:22 AM, David Howells wrote: > > (2) Don't write to a page that's being written out, but wait for it to > complete. 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 (b) can cause some really nasty latency issues So the "page->private" issue does mean that write-vs-writeback clearly needs that serialization (and that's not an issue for the mapped page being changed at the same time), but in general filesystem people should be aware that data under writeback may still be further dirtied while the writeback is active (and the page marked dirty again). It can obviously screw with things like checksums etc, and make for temporarily inconsistent state if the filesystem does those kinds of things. Linus