From: "Lukáš Czerner" <lczerner@redhat.com>
To: Namjae Jeon <namjae.jeon@samsung.com>
Cc: 'Andrew Morton' <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-ext4 <linux-ext4@vger.kernel.org>,
'Matthew Wilcox' <matthew.r.wilcox@intel.com>,
'Eric Whitney' <enwlinux@gmail.com>,
Ashish Sangwan <a.sangwan@samsung.com>
Subject: Re: [PATCH] msync: fix incorrect fstart calculation
Date: Fri, 27 Jun 2014 13:51:11 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1406271348150.2349@localhost.localdomain> (raw)
In-Reply-To: <006a01cf91fc$5d225170$1766f450$@samsung.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1762 bytes --]
On Fri, 27 Jun 2014, Namjae Jeon wrote:
> Date: Fri, 27 Jun 2014 20:38:49 +0900
> From: Namjae Jeon <namjae.jeon@samsung.com>
> To: 'Andrew Morton' <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org, linux-ext4 <linux-ext4@vger.kernel.org>,
> Luka1 Czerner <lczerner@redhat.com>,
> 'Matthew Wilcox' <matthew.r.wilcox@intel.com>,
> 'Eric Whitney' <enwlinux@gmail.com>,
> Ashish Sangwan <a.sangwan@samsung.com>
> Subject: [PATCH] msync: fix incorrect fstart calculation
>
> Fix a regression caused by Commit 7fc34a62ca mm/msync.c: sync only
> the requested range in msync().
> xfstests generic/075 fail occured on ext4 data=journal mode because
> the intended range was not syncing due to wrong fstart calculation.
Looks good to me and it fixes the issues with data=journal on ext4.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Tested-by: Lukas Czerner <lczerner@redhat.com>
>
> Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
> Cc: Luka1 Czerner <lczerner@redhat.com>
> Reported-by: Eric Whitney <enwlinux@gmail.com>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
> ---
> mm/msync.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/msync.c b/mm/msync.c
> index a5c6736..ad97dce 100644
> --- a/mm/msync.c
> +++ b/mm/msync.c
> @@ -78,7 +78,8 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
> goto out_unlock;
> }
> file = vma->vm_file;
> - fstart = start + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
> + fstart = (start - vma->vm_start) +
> + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
> fend = fstart + (min(end, vma->vm_end) - start) - 1;
> start = vma->vm_end;
> if ((flags & MS_SYNC) && file &&
>
next prev parent reply other threads:[~2014-06-27 11:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 11:38 Namjae Jeon
2014-06-27 11:51 ` Lukáš Czerner [this message]
2014-06-27 12:43 ` Wilcox, Matthew R
2014-06-27 16:12 ` Eric Whitney
2014-06-28 19:14 ` Theodore Ts'o
2014-06-28 19:44 ` Andrew Morton
2014-06-28 19:57 ` Theodore Ts'o
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=alpine.LFD.2.00.1406271348150.2349@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=a.sangwan@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=enwlinux@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.r.wilcox@intel.com \
--cc=namjae.jeon@samsung.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