From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, hirofumi@mail.parknet.co.jp,
cccheng@synology.com, akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] fat-ignore-ctime-updates-and-keep-ctime-identical-to-mtime-in-memory.patch removed from -mm tree
Date: Thu, 19 May 2022 15:27:32 -0700 [thread overview]
Message-ID: <20220519222732.CDF76C385AA@smtp.kernel.org> (raw)
The quilt patch titled
Subject: fat: ignore ctime updates, and keep ctime identical to mtime in memory
has been removed from the -mm tree. Its filename was
fat-ignore-ctime-updates-and-keep-ctime-identical-to-mtime-in-memory.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Chung-Chiang Cheng <cccheng@synology.com>
Subject: fat: ignore ctime updates, and keep ctime identical to mtime in memory
Date: Tue, 3 May 2022 23:25:34 +0800
FAT supports creation time but not change time, and there was no
corresponding timestamp for creation time in previous VFS. The original
implementation took the compromise of saving the in-memory change time
into the on-disk creation time field, but this would lead to compatibility
issues with non-linux systems.
To address this issue, this patch changes the behavior of ctime. It will
no longer be loaded and stored from the creation time on disk. Instead of
that, it'll be consistent with the in-memory mtime and share the same
on-disk field. All updates to mtime will also be applied to ctime in
memory, while all updates to ctime will be ignored.
Link: https://lkml.kernel.org/r/20220503152536.2503003-2-cccheng@synology.com
Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/fat/inode.c | 11 ++++-------
fs/fat/misc.c | 9 ++++++---
2 files changed, 10 insertions(+), 10 deletions(-)
--- a/fs/fat/inode.c~fat-ignore-ctime-updates-and-keep-ctime-identical-to-mtime-in-memory
+++ a/fs/fat/inode.c
@@ -567,12 +567,11 @@ int fat_fill_inode(struct inode *inode,
& ~((loff_t)sbi->cluster_size - 1)) >> 9;
fat_time_fat2unix(sbi, &inode->i_mtime, de->time, de->date, 0);
- if (sbi->options.isvfat) {
- fat_time_fat2unix(sbi, &inode->i_ctime, de->ctime,
- de->cdate, de->ctime_cs);
+ inode->i_ctime = inode->i_mtime;
+ if (sbi->options.isvfat)
fat_time_fat2unix(sbi, &inode->i_atime, 0, de->adate, 0);
- } else
- fat_truncate_time(inode, &inode->i_mtime, S_ATIME|S_CTIME);
+ else
+ inode->i_atime = fat_truncate_atime(sbi, &inode->i_mtime);
return 0;
}
@@ -888,8 +887,6 @@ retry:
&raw_entry->date, NULL);
if (sbi->options.isvfat) {
__le16 atime;
- fat_time_unix2fat(sbi, &inode->i_ctime, &raw_entry->ctime,
- &raw_entry->cdate, &raw_entry->ctime_cs);
fat_time_unix2fat(sbi, &inode->i_atime, &atime,
&raw_entry->adate, NULL);
}
--- a/fs/fat/misc.c~fat-ignore-ctime-updates-and-keep-ctime-identical-to-mtime-in-memory
+++ a/fs/fat/misc.c
@@ -347,10 +347,13 @@ int fat_truncate_time(struct inode *inod
if (flags & S_ATIME)
inode->i_atime = fat_truncate_atime(sbi, now);
- if (flags & S_CTIME)
- inode->i_ctime = fat_truncate_crtime(sbi, now);
+ /*
+ * ctime and mtime share the same on-disk field, and should be
+ * identical in memory. all mtime updates will be applied to ctime,
+ * but ctime updates are ignored.
+ */
if (flags & S_MTIME)
- inode->i_mtime = fat_truncate_mtime(sbi, now);
+ inode->i_mtime = inode->i_ctime = fat_truncate_mtime(sbi, now);
return 0;
}
_
Patches currently in -mm which might be from cccheng@synology.com are
reply other threads:[~2022-05-19 22:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220519222732.CDF76C385AA@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=cccheng@synology.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@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.