All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: "Jörg-Volker Peetz" <jvpeetz@web.de>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4 lazytime: ctime of some files changed
Date: Thu, 14 May 2015 18:20:44 -0400	[thread overview]
Message-ID: <20150514222044.GA3901@thunk.org> (raw)
In-Reply-To: <mivtkj$fhi$1@ger.gmane.org>

On Wed, May 13, 2015 at 06:20:35PM +0200, Jörg-Volker Peetz wrote:
> 
> Thereafter, the two emacs package files again had a wrong mtime (which by the
> way shows when I start emacs).
> 
> Could this be due to the lazytime mount option?

I think I found the problem.  My bad.  Can you verify that this solves
the problem for you?

From 8f4d855839179f410fa910a26eb81d646d628f26 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 14 May 2015 18:19:01 -0400
Subject: [PATCH] ext4: fix lazytime optimization

We had a fencepost error in the lazytime optimization which means that
timestamp would get written to the wrong inode.

Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 55b187c..0554b0b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4345,7 +4345,7 @@ static void ext4_update_other_inodes_time(struct super_block *sb,
 	int inode_size = EXT4_INODE_SIZE(sb);
 
 	oi.orig_ino = orig_ino;
-	ino = orig_ino & ~(inodes_per_block - 1);
+	ino = (orig_ino & ~(inodes_per_block - 1)) + 1;
 	for (i = 0; i < inodes_per_block; i++, ino++, buf += inode_size) {
 		if (ino == orig_ino)
 			continue;
-- 
2.3.0

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

  reply	other threads:[~2015-05-14 22:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13  9:35 ext4 lazytime: ctime of some files changed Jörg-Volker Peetz
2015-05-13 16:20 ` Jörg-Volker Peetz
2015-05-14 22:20   ` Theodore Ts'o [this message]
2015-05-15  7:17     ` Jörg-Volker Peetz
2015-05-15 15:14     ` Jörg-Volker Peetz
2015-05-15 23:11       ` Theodore Ts'o
2015-05-20  8:48         ` Jörg-Volker Peetz
2015-05-23 13:24           ` Jörg-Volker Peetz
2015-05-14  2:17 ` Theodore Ts'o
2015-05-14  8:27   ` Jörg-Volker Peetz
2015-05-14 12:38     ` Theodore Ts'o
2015-05-14 12:58       ` Jörg-Volker Peetz
2015-05-14 13:09         ` Jörg-Volker Peetz
2015-05-14 17:58         ` Jörg-Volker Peetz
2015-05-14  8:34   ` Jörg-Volker Peetz
2015-05-16 14:30 ` Holger Hoffstätte

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=20150514222044.GA3901@thunk.org \
    --to=tytso@mit.edu \
    --cc=jvpeetz@web.de \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.