From: Jan Kara <jack@suse.cz>
To: Jeff Layton <jlayton@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
ceph-devel@vger.kernel.org
Subject: Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions
Date: Thu, 6 Jul 2023 12:53:45 +0200 [thread overview]
Message-ID: <20230706105345.cdoadx7hvb227vts@quack3> (raw)
In-Reply-To: <20230705190309.579783-28-jlayton@kernel.org>
On Wed 05-07-23 15:00:55, Jeff Layton wrote:
> In later patches, we're going to change how the inode's ctime field is
> used. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
>
> Reviewed-by: Xiubo Li <xiubli@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Just one nit below:
> @@ -688,6 +688,7 @@ void ceph_fill_file_time(struct inode *inode, int issued,
> struct timespec64 *mtime, struct timespec64 *atime)
> {
> struct ceph_inode_info *ci = ceph_inode(inode);
> + struct timespec64 ictime = inode_get_ctime(inode);
> int warn = 0;
>
> if (issued & (CEPH_CAP_FILE_EXCL|
> @@ -696,11 +697,12 @@ void ceph_fill_file_time(struct inode *inode, int issued,
> CEPH_CAP_AUTH_EXCL|
> CEPH_CAP_XATTR_EXCL)) {
> if (ci->i_version == 0 ||
> - timespec64_compare(ctime, &inode->i_ctime) > 0) {
> + timespec64_compare(ctime, &ictime) > 0) {
> dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n",
> - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
> + inode_get_ctime(inode).tv_sec,
> + inode_get_ctime(inode).tv_nsec,
I think here you can use ictime instead of inode_get_ctime(inode).
Otherwise feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2023-07-06 10:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230705185755.579053-1-jlayton@kernel.org>
[not found] ` <20230705190309.579783-1-jlayton@kernel.org>
2023-07-05 19:00 ` [PATCH v2 30/92] ceph: convert to ctime accessor functions Jeff Layton
2023-07-06 10:53 ` Jan Kara [this message]
2023-07-06 11:47 ` Jeff Layton
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=20230706105345.cdoadx7hvb227vts@quack3 \
--to=jack@suse.cz \
--cc=brauner@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xiubli@redhat.com \
/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