From: Jan Kara <jack@suse.cz>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: Jan Kara <jack@suse.cz>, Dave Chinner <david@fromorbit.com>,
Matthew Wilcox <matthew.r.wilcox@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Hugh Dickins <hughd@google.com>, Mel Gorman <mgorman@suse.de>,
linux-mm@kvack.org, linux-nvdimm <linux-nvdimm@ml01.01.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 3/3 v2] dax: use pfn_mkwrite to update c/mtime + freeze protection
Date: Thu, 5 Mar 2015 11:35:29 +0100 [thread overview]
Message-ID: <20150305103529.GA2836@quack.suse.cz> (raw)
In-Reply-To: <54F822A9.7090707@plexistor.com>
On Thu 05-03-15 11:32:25, Boaz Harrosh wrote:
> 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?
Hum, that's a good question. Probably we don't end up doing that. For
normal filesystems we sync all inodes which also writeprotects all pages
(in clear_page_dirty_for_io() - for normal filesystems we know that if page
is writeably mapped it is dirty). However this won't happen for pfn
mapping as we don't have dirty pages. So we probably need dax_freeze()
implementation that will walk through all inodes with writeable mappings and
writeprotect them.
> 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
I don't remember there would be any test to specifically test this.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-03-05 10:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 16:33 [PATCH 0/3] DAX: Fix mmap-write not updating c/mtime Boaz Harrosh
2015-03-04 16:37 ` [PATCH 1/3] xfstests: generic/080 test that mmap-write updates c/mtime Boaz Harrosh
2015-03-05 0:13 ` Dave Chinner
2015-03-05 14:02 ` [PATCH 1/3 v2] xfstest: " Boaz Harrosh
2015-03-05 14:12 ` Boaz Harrosh
2015-03-04 16:41 ` [PATCH 2/3] mm: New pfn_mkwrite same as page_mkwrite for VM_PFNMAP Boaz Harrosh
2015-03-04 16:48 ` [PATCH 3/3] DAX: use pfn_mkwrite to update c/mtime Boaz Harrosh
2015-03-04 17:19 ` Jan Kara
2015-03-05 9:24 ` [PATCH 3/3 v2] dax: use pfn_mkwrite to update c/mtime + freeze protection Boaz Harrosh
2015-03-05 9:32 ` Boaz Harrosh
2015-03-05 10:35 ` Jan Kara [this message]
2015-03-05 10:47 ` Boaz Harrosh
2015-03-05 10:56 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150305103529.GA2836@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=boaz@plexistor.com \
--cc=david@fromorbit.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=matthew.r.wilcox@intel.com \
--cc=mgorman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox