From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 3/3] RFC: dax: dax_prepare_freeze Date: Tue, 24 Mar 2015 09:40:47 +1100 Message-ID: <20150323224047.GQ28621@dastard> References: <55100B78.501@plexistor.com> <55100D10.6090902@plexistor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , Andrew Morton , "Kirill A. Shutemov" , Jan Kara , Hugh Dickins , Mel Gorman , linux-mm@kvack.org, linux-nvdimm , linux-fsdevel , Eryu Guan To: Boaz Harrosh Return-path: Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:43494 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbbCWWku (ORCPT ); Mon, 23 Mar 2015 18:40:50 -0400 Content-Disposition: inline In-Reply-To: <55100D10.6090902@plexistor.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Mar 23, 2015 at 02:54:40PM +0200, Boaz Harrosh wrote: > From: Boaz Harrosh > > When freezing an FS, we must write protect all IS_DAX() > inodes that have an mmap mapping on an inode. Otherwise > application will be able to modify previously faulted-in > file pages. All you need to do is lock out page faults once the page is clean; that's what the sb_start_pagefault() calls are for in the page fault path - they catch write faults and block them until the filesystem is unfrozen. Hence I'm not sure why this would be necessary if you are catching write faults in .pfn_mkwrite.... Cheers, Dave. -- Dave Chinner david@fromorbit.com