From: Brian Foster <bfoster@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-bcachefs@vger.kernel.org
Subject: Re: [PATCH v2 20/89] bcachefs: convert to new timestamp accessors
Date: Thu, 5 Oct 2023 08:08:58 -0400 [thread overview]
Message-ID: <ZR6nWs/kFcw0+0ib@bfoster> (raw)
In-Reply-To: <20231004185347.80880-18-jlayton@kernel.org>
On Wed, Oct 04, 2023 at 02:52:05PM -0400, Jeff Layton wrote:
> Convert to using the new inode timestamp accessor functions.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
Acked-by: Brian Foster <bfoster@redhat.com>
> fs/bcachefs/fs.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
> index 09137a20449b..1fbaad27d07b 100644
> --- a/fs/bcachefs/fs.c
> +++ b/fs/bcachefs/fs.c
> @@ -66,9 +66,9 @@ void bch2_inode_update_after_write(struct btree_trans *trans,
> inode->v.i_mode = bi->bi_mode;
>
> if (fields & ATTR_ATIME)
> - inode->v.i_atime = bch2_time_to_timespec(c, bi->bi_atime);
> + inode_set_atime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_atime));
> if (fields & ATTR_MTIME)
> - inode->v.i_mtime = bch2_time_to_timespec(c, bi->bi_mtime);
> + inode_set_mtime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_mtime));
> if (fields & ATTR_CTIME)
> inode_set_ctime_to_ts(&inode->v, bch2_time_to_timespec(c, bi->bi_ctime));
>
> @@ -753,8 +753,8 @@ static int bch2_getattr(struct mnt_idmap *idmap,
> stat->gid = inode->v.i_gid;
> stat->rdev = inode->v.i_rdev;
> stat->size = i_size_read(&inode->v);
> - stat->atime = inode->v.i_atime;
> - stat->mtime = inode->v.i_mtime;
> + stat->atime = inode_get_atime(&inode->v);
> + stat->mtime = inode_get_mtime(&inode->v);
> stat->ctime = inode_get_ctime(&inode->v);
> stat->blksize = block_bytes(c);
> stat->blocks = inode->v.i_blocks;
> @@ -1418,8 +1418,8 @@ static int inode_update_times_fn(struct btree_trans *trans,
> {
> struct bch_fs *c = inode->v.i_sb->s_fs_info;
>
> - bi->bi_atime = timespec_to_bch2_time(c, inode->v.i_atime);
> - bi->bi_mtime = timespec_to_bch2_time(c, inode->v.i_mtime);
> + bi->bi_atime = timespec_to_bch2_time(c, inode_get_atime(&inode->v));
> + bi->bi_mtime = timespec_to_bch2_time(c, inode_get_mtime(&inode->v));
> bi->bi_ctime = timespec_to_bch2_time(c, inode_get_ctime(&inode->v));
>
> return 0;
> --
> 2.41.0
>
next prev parent reply other threads:[~2023-10-05 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 18:52 [PATCH v2 00/89] fs: new accessor methods for inode atime and mtime Jeff Layton
[not found] ` <20231004185347.80880-1-jlayton@kernel.org>
2023-10-04 18:52 ` [PATCH v2 20/89] bcachefs: convert to new timestamp accessors Jeff Layton
2023-10-05 12:08 ` Brian Foster [this message]
2023-10-04 18:52 ` [PATCH v2 01/89] fs: new accessor methods for atime and mtime Jeff Layton
2023-10-04 18:52 ` [PATCH v2 02/89] fs: convert core infrastructure to new timestamp accessors Jeff Layton
2023-10-09 16:09 ` [PATCH v2 00/89] fs: new accessor methods for inode atime and mtime 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=ZR6nWs/kFcw0+0ib@bfoster \
--to=bfoster@redhat.com \
--cc=brauner@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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