From: Chao Yu <yuchao0@huawei.com>
To: sunqiuyang <sunqiuyang@huawei.com>,
<linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [PATCH v2 1/2] f2fs: dax: fix races between page faults and truncating pages
Date: Wed, 7 Jun 2017 17:41:07 +0800 [thread overview]
Message-ID: <29f704b5-b187-9c26-c60e-8459fa03a710@huawei.com> (raw)
In-Reply-To: <1495076805-18082-1-git-send-email-sunqiuyang@huawei.com>
On 2017/5/18 11:06, sunqiuyang wrote:
> From: Qiuyang Sun <sunqiuyang@huawei.com>
>
> Currently in F2FS, page faults and operations that truncate the pagecahe
> or data blocks, are completely unsynchronized. This can result in page
> fault faulting in a page into a range that we are changing after
> truncating, and thus we can end up with a page mapped to disk blocks that
> will be shortly freed. Filesystem corruption will shortly follow.
>
> This patch fixes the problem by creating new rw semaphore i_mmap_sem in
> f2fs_inode_info and grab it for functions removing blocks from extent tree
> and for read over page faults. The mechanism is similar to that in ext4.
>
> Signed-off-by: Qiuyang Sun <sunqiuyang@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
next prev parent reply other threads:[~2017-06-07 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 3:06 sunqiuyang
2017-06-07 9:41 ` Chao Yu [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-18 3:06 sunqiuyang
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=29f704b5-b187-9c26-c60e-8459fa03a710@huawei.com \
--to=yuchao0@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sunqiuyang@huawei.com \
/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
all inboxes | Powered by JetHome®