From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755374AbcIMHRj (ORCPT ); Tue, 13 Sep 2016 03:17:39 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:38209 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755028AbcIMHRg (ORCPT ); Tue, 13 Sep 2016 03:17:36 -0400 Date: Tue, 13 Sep 2016 00:17:32 -0700 From: Christoph Hellwig To: Nicholas Piggin Cc: Dave Chinner , Christoph Hellwig , "Oliver O'Halloran" , Yumei Huang , Michal Hocko , Xiao Guangrong , Andrew Morton , KVM list , Linux MM , Gleb Natapov , "linux-nvdimm@lists.01.org" , mtosatti@redhat.com, "linux-kernel@vger.kernel.org" , Dave Hansen , Stefan Hajnoczi , linux-fsdevel , Paolo Bonzini Subject: Re: DAX mapping detection (was: Re: [PATCH] Fix region lost in /proc/self/smaps) Message-ID: <20160913071732.GA19433@infradead.org> References: <20160908225636.GB15167@linux.intel.com> <20160912052703.GA1897@infradead.org> <20160912075128.GB21474@infradead.org> <20160912180507.533b3549@roar.ozlabs.ibm.com> <20160912213435.GD30497@dastard> <20160913115311.509101b0@roar.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160913115311.509101b0@roar.ozlabs.ibm.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 13, 2016 at 11:53:11AM +1000, Nicholas Piggin wrote: > - Application mmaps a file, faults in block 0 > - FS allocates block, creates mappings, syncs metadata, sets "no fsync" > flag for that block, and completes the fault. > - Application writes some data to block 0, completes userspace flushes > > * At this point, a crash must return with above data (or newer). > > - Application starts writing more stuff into block 0 > - Concurrently, fault in block 1 > - FS starts to allocate, splits trees including mappings to block 0 > > * Crash > > Is that right? How does your filesystem lose data before the sync > point? Witht all current file systems chances are your metadata hasn't been flushed out. You could write all metadata synchronously from the page fault handler, but that's basically asking for all kinds of deadlocks. > If there is any huge complexity or unsolved problem, it is in XFS. > Conceptual problem is simple. Good to have you back and make all the hard thing simple :)