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:56:26 +0100 [thread overview]
Message-ID: <20150305105626.GB2836@quack.suse.cz> (raw)
In-Reply-To: <54F83442.2060101@plexistor.com>
On Thu 05-03-15 12:47:30, Boaz Harrosh wrote:
> On 03/05/2015 12:35 PM, Jan Kara wrote:
> > On Thu 05-03-15 11:32:25, Boaz Harrosh wrote:
> >> On 03/05/2015 11:24 AM, Boaz Harrosh wrote:
> <>
> >>
> >> 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.
> >
>
> I'll go head and try my shot on implementing a dax_freeze(). But I will
> please need help with where to call it from.
>
> Probably something like:
> if (IS_DAX(inode))
> dax_freeze(inode);
> else
> sync(inode)
We normally call sync_filesystem() from fs/superblock:freeze_super(). For
DAX filesystems we'd also need to call the special function after that.
Maybe dax_freeze() isn't the best name. It could be called something like
dax_writeprotect(sb) or something like that.
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>
prev parent reply other threads:[~2015-03-05 10:56 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
2015-03-05 10:47 ` Boaz Harrosh
2015-03-05 10:56 ` Jan Kara [this message]
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=20150305105626.GB2836@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