From: Jeff Layton <jlayton@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>,
Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
Chuck Lever <chuck.lever@oracle.com>
Cc: Jan Kara <jack@suse.cz>, Amir Goldstein <amir73il@gmail.com>,
David Howells <dhowells@redhat.com>, Neil Brown <neilb@suse.de>,
Matthew Wilcox <willy@infradead.org>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Theodore T'so <tytso@mit.edu>, Chris Mason <clm@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
Namjae Jeon <linkinjeon@kernel.org>,
Steve French <sfrench@samba.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Tom Talpey <tom@talpey.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-mm@kvack.org,
linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org
Subject: [PATCH v4 7/9] xfs: switch to multigrain timestamps
Date: Thu, 18 May 2023 07:47:40 -0400 [thread overview]
Message-ID: <20230518114742.128950-8-jlayton@kernel.org> (raw)
In-Reply-To: <20230518114742.128950-1-jlayton@kernel.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/xfs/libxfs/xfs_inode_buf.c | 2 +-
fs/xfs/xfs_inode_item.c | 2 +-
fs/xfs/xfs_iops.c | 4 ++--
fs/xfs/xfs_super.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 758aacd8166b..c29e961fac34 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -316,7 +316,7 @@ xfs_inode_to_disk(
to->di_atime = xfs_inode_to_disk_ts(ip, inode->i_atime);
to->di_mtime = xfs_inode_to_disk_ts(ip, inode->i_mtime);
- to->di_ctime = xfs_inode_to_disk_ts(ip, inode->i_ctime);
+ to->di_ctime = xfs_inode_to_disk_ts(ip, ctime_peek(inode));
to->di_nlink = cpu_to_be32(inode->i_nlink);
to->di_gen = cpu_to_be32(inode->i_generation);
to->di_mode = cpu_to_be16(inode->i_mode);
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index ca2941ab6cbc..018f187387f0 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -381,7 +381,7 @@ xfs_inode_to_log_dinode(
memset(to->di_pad3, 0, sizeof(to->di_pad3));
to->di_atime = xfs_inode_to_log_dinode_ts(ip, inode->i_atime);
to->di_mtime = xfs_inode_to_log_dinode_ts(ip, inode->i_mtime);
- to->di_ctime = xfs_inode_to_log_dinode_ts(ip, inode->i_ctime);
+ to->di_ctime = xfs_inode_to_log_dinode_ts(ip, ctime_peek(inode));
to->di_nlink = inode->i_nlink;
to->di_gen = inode->i_generation;
to->di_mode = inode->i_mode;
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 24718adb3c16..f101b543a33f 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -573,10 +573,10 @@ xfs_vn_getattr(
stat->gid = vfsgid_into_kgid(vfsgid);
stat->ino = ip->i_ino;
stat->atime = inode->i_atime;
- stat->mtime = inode->i_mtime;
- stat->ctime = inode->i_ctime;
stat->blocks = XFS_FSB_TO_BB(mp, ip->i_nblocks + ip->i_delayed_blks);
+ fill_multigrain_cmtime(request_mask, inode, stat);
+
if (xfs_has_v3inodes(mp)) {
if (request_mask & STATX_BTIME) {
stat->result_mask |= STATX_BTIME;
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 7e706255f165..71c04cec974b 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1992,7 +1992,7 @@ static struct file_system_type xfs_fs_type = {
.init_fs_context = xfs_init_fs_context,
.parameters = xfs_fs_parameters,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_MULTIGRAIN_TS,
};
MODULE_ALIAS_FS("xfs");
--
2.40.1
next prev parent reply other threads:[~2023-05-18 11:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 11:47 [PATCH v4 0/9] fs: implement multigrain timestamps Jeff Layton
2023-05-18 11:47 ` [PATCH v4 1/9] fs: pass the request_mask to generic_fillattr Jeff Layton
2023-05-23 9:17 ` Jan Kara
2023-05-18 11:47 ` [PATCH v4 2/9] fs: add infrastructure for multigrain inode i_m/ctime Jeff Layton
2023-05-20 20:06 ` Theodore Ts'o
2023-05-21 2:21 ` Boqun Feng
2023-05-21 8:11 ` Paul E. McKenney
2023-05-21 8:32 ` Paul E. McKenney
2023-05-23 10:02 ` Jan Kara
2023-05-23 10:17 ` Jan Kara
2023-05-23 10:56 ` Jeff Layton
2023-05-23 11:01 ` Christian Brauner
2023-05-23 11:15 ` Jeff Layton
2023-06-13 19:47 ` Jeff Layton
2023-05-23 10:38 ` Christian Brauner
2023-05-23 10:40 ` Jeff Layton
2023-05-23 12:46 ` Jan Kara
2023-06-13 13:09 ` Jeff Layton
2023-06-14 6:29 ` Christian Brauner
2023-05-18 11:47 ` [PATCH v4 3/9] overlayfs: allow it to handle multigrain timestamps Jeff Layton
2023-05-18 11:47 ` [PATCH v4 4/9] nfsd: ensure we use ctime_peek to grab the inode->i_ctime Jeff Layton
2023-05-18 13:43 ` Chuck Lever III
2023-05-18 15:31 ` Jeff Layton
2023-05-19 10:36 ` Christian Brauner
2023-05-19 11:22 ` Jeff Layton
2023-05-18 11:47 ` [PATCH v4 5/9] ksmbd: use ctime_peek to grab the ctime out of the inode Jeff Layton
2023-05-18 11:47 ` [PATCH v4 6/9] tmpfs: add support for multigrain timestamps Jeff Layton
2023-05-18 11:47 ` Jeff Layton [this message]
2023-05-18 11:47 ` [PATCH v4 8/9] ext4: convert to " Jeff Layton
2023-05-20 20:29 ` Theodore Ts'o
2023-05-18 11:47 ` [PATCH v4 9/9] btrfs: " Jeff Layton
2023-05-22 9:56 ` David Sterba
2023-05-22 10:08 ` Jeff Layton
2023-05-22 10:53 ` Christian Brauner
2023-05-22 9:54 ` [PATCH v4 0/9] fs: implement " Christian Brauner
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=20230518114742.128950-8-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=clm@fb.com \
--cc=david@fromorbit.com \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=dsterba@suse.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linkinjeon@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=tom@talpey.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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 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).