linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>
To: Jonathan Nieder
	<jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Willy Tarreau <w@1wt.eu>
Cc: Ext4 Developers List
	<linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	KONISHI Ryusuke
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>,
	stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode
Date: Sun, 30 Sep 2012 16:30:26 -0400	[thread overview]
Message-ID: <20120930203026.GD4780@thunk.org> (raw)
In-Reply-To: <20120930195341.GC4780-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>

The rewritten commit description:

ext4: fix mtime update in nodelalloc mode

Commits 5e8830dc85d0 and 41c4d25f78c0 introduced a regression into
3.6-rc1 for ext4 in nodealloc mode, such that mtime updates would not
take place for files modified via mmap if the page was already in the
page cache.  This would also affect ext3 file systems mounted using
the ext4 file system driver.

The problem was that ext4_page_mkwrite() had a shortcut which would
avoid calling __block_page_mkwrite() under some circumstances, and the
above two commit transferred the responsibility of calling
file_update_time() to __block_page_mkwrite --- which woudln't get
called in some circumstances.

Since __block_page_mkwrite() only has three callers,
block_page_mkwrite(), ext4_page_mkwrite, and nilfs_page_mkwrite(), the
best way to solve this is to move the responsibility for calling
file_update_time() to its caller.

This problem was found via xfstests #215 with a file system mounted
with -o nodelalloc.

Signed-off-by: "Theodore Ts'o" <tytso-3s7WtUTddSA@public.gmane.org>
Cc: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
Cc: KONISHI Ryusuke <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Note: If this gets pushed to Linus before the merge window opens, I'll
drop the cc of stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, since the regression was
introduced in 3.6-rc1.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-09-30 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30 19:48 [PATCH REGRESSION FIX] ext4: fix mtime update in nodelalloc mode Theodore Ts'o
2012-09-30 19:50 ` Jonathan Nieder
2012-09-30 19:53   ` Theodore Ts'o
     [not found]     ` <20120930195341.GC4780-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2012-09-30 20:30       ` Theodore Ts'o [this message]
     [not found]         ` <20120930203026.GD4780-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2012-10-01  9:32           ` Jan Kara
     [not found] ` <1349034499-4731-1-git-send-email-tytso-3s7WtUTddSA@public.gmane.org>
2012-09-30 19:50   ` Theodore Ts'o
2012-09-30 19:51   ` Willy Tarreau

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=20120930203026.GD4780@thunk.org \
    --to=tytso-3s7wtutddsa@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=w@1wt.eu \
    /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;
as well as URLs for NNTP newsgroup(s).