From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 3/3 v2] dax: use pfn_mkwrite to update c/mtime + freeze protection Date: Thu, 05 Mar 2015 11:32:25 +0200 Message-ID: <54F822A9.7090707@plexistor.com> References: <54F733BD.7060807@plexistor.com> <54F73746.5020300@plexistor.com> <20150304171935.GA5443@quack.suse.cz> <54F820E2.9060109@plexistor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Dave Chinner , Matthew Wilcox , Andrew Morton , "Kirill A. Shutemov" , Hugh Dickins , Mel Gorman , linux-mm@kvack.org, linux-nvdimm , linux-fsdevel To: Jan Kara Return-path: Received: from mail-we0-f180.google.com ([74.125.82.180]:45808 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754711AbbCEJc3 (ORCPT ); Thu, 5 Mar 2015 04:32:29 -0500 Received: by wesp10 with SMTP id p10so49486563wes.12 for ; Thu, 05 Mar 2015 01:32:28 -0800 (PST) In-Reply-To: <54F820E2.9060109@plexistor.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 03/05/2015 11:24 AM, Boaz Harrosh wrote: > > [v1] > Without this patch, c/mtime is not updated correctly when mmap'ed page is > first read from and then written to. > > A new xfstest is submitted for testing this (generic/080) > > [v2] > Jan Kara has pointed out that if we add the > sb_start/end_pagefault pair in the new pfn_mkwrite we > are then fixing another bug where: A user could start > writing to the page while filesystem is frozen. > Thanks Jan. Just as curiosity, does the freezing code goes and turns all mappings into read-only, Also for pfn mapping? Do you think there is already an xfstest freezing test that should now fail, and will succeed after this patch (v2). Something like: * mmap-read/write before the freeze * freeze the fs * Another thread tries to mmap-write, should get stuck * unfreeze the fs * Now mmap-writer continues Thanks again Boaz > CC: Jan Kara > Signed-off-by: Yigal Korman > Signed-off-by: Boaz Harrosh <>