* [PATCH] gfs2: fix timestamp handling on quota inodes
@ 2023-07-13 13:52 Jeff Layton
2023-07-13 13:59 ` Christian Brauner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Layton @ 2023-07-13 13:52 UTC (permalink / raw)
To: brauner, Bob Peterson, Andreas Gruenbacher
Cc: linux-fsdevel, cluster-devel, linux-kernel
While these aren't generally visible from userland, it's best to be
consistent with timestamp handling. When adjusting the quota, update the
mtime and ctime like we would with a write operation on any other inode,
and avoid updating the atime which should only be done for reads.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/gfs2/quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Christian,
Would you mind picking this into the vfs.ctime branch, assuming the GFS2
maintainers ack it? Andreas and I had discussed this privately, and I
think it makes sense as part of that series.
Thanks,
Jeff
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 704192b73605..aa5fd06d47bc 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -871,7 +871,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
size = loc + sizeof(struct gfs2_quota);
if (size > inode->i_size)
i_size_write(inode, size);
- inode->i_mtime = inode->i_atime = current_time(inode);
+ inode->i_mtime = inode_set_ctime_current(inode);
mark_inode_dirty(inode);
set_bit(QDF_REFRESH, &qd->qd_flags);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gfs2: fix timestamp handling on quota inodes
2023-07-13 13:52 [PATCH] gfs2: fix timestamp handling on quota inodes Jeff Layton
@ 2023-07-13 13:59 ` Christian Brauner
2023-07-13 14:15 ` Andreas Gruenbacher
2023-07-13 14:25 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2023-07-13 13:59 UTC (permalink / raw)
To: Jeff Layton
Cc: Bob Peterson, Andreas Gruenbacher, linux-fsdevel, cluster-devel,
linux-kernel
On Thu, Jul 13, 2023 at 09:52:48AM -0400, Jeff Layton wrote:
> While these aren't generally visible from userland, it's best to be
> consistent with timestamp handling. When adjusting the quota, update the
> mtime and ctime like we would with a write operation on any other inode,
> and avoid updating the atime which should only be done for reads.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/gfs2/quota.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Christian,
>
> Would you mind picking this into the vfs.ctime branch, assuming the GFS2
> maintainers ack it? Andreas and I had discussed this privately, and I
Happy to!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gfs2: fix timestamp handling on quota inodes
2023-07-13 13:52 [PATCH] gfs2: fix timestamp handling on quota inodes Jeff Layton
2023-07-13 13:59 ` Christian Brauner
@ 2023-07-13 14:15 ` Andreas Gruenbacher
2023-07-13 14:25 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Gruenbacher @ 2023-07-13 14:15 UTC (permalink / raw)
To: Jeff Layton
Cc: brauner, Bob Peterson, linux-fsdevel, cluster-devel, linux-kernel
Jeff and Christian,
On Thu, Jul 13, 2023 at 3:52 PM Jeff Layton <jlayton@kernel.org> wrote:
> While these aren't generally visible from userland, it's best to be
> consistent with timestamp handling. When adjusting the quota, update the
> mtime and ctime like we would with a write operation on any other inode,
> and avoid updating the atime which should only be done for reads.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/gfs2/quota.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Christian,
>
> Would you mind picking this into the vfs.ctime branch, assuming the GFS2
> maintainers ack it? Andreas and I had discussed this privately, and I
> think it makes sense as part of that series.
Yes, please.
> Thanks,
> Jeff
>
> diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
> index 704192b73605..aa5fd06d47bc 100644
> --- a/fs/gfs2/quota.c
> +++ b/fs/gfs2/quota.c
> @@ -871,7 +871,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
> size = loc + sizeof(struct gfs2_quota);
> if (size > inode->i_size)
> i_size_write(inode, size);
> - inode->i_mtime = inode->i_atime = current_time(inode);
> + inode->i_mtime = inode_set_ctime_current(inode);
> mark_inode_dirty(inode);
> set_bit(QDF_REFRESH, &qd->qd_flags);
> }
> --
> 2.41.0
>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Thanks,
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gfs2: fix timestamp handling on quota inodes
2023-07-13 13:52 [PATCH] gfs2: fix timestamp handling on quota inodes Jeff Layton
2023-07-13 13:59 ` Christian Brauner
2023-07-13 14:15 ` Andreas Gruenbacher
@ 2023-07-13 14:25 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2023-07-13 14:25 UTC (permalink / raw)
To: Andreas Gruenbacher, Jeff Layton
Cc: Christian Brauner, linux-fsdevel, cluster-devel, linux-kernel,
Bob Peterson
On Thu, 13 Jul 2023 09:52:48 -0400, Jeff Layton wrote:
> While these aren't generally visible from userland, it's best to be
> consistent with timestamp handling. When adjusting the quota, update the
> mtime and ctime like we would with a write operation on any other inode,
> and avoid updating the atime which should only be done for reads.
>
>
Applied to the vfs.ctime branch of the vfs/vfs.git tree.
Patches in the vfs.ctime branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.ctime
[1/1] gfs2: fix timestamp handling on quota inodes
https://git.kernel.org/vfs/vfs/c/ea462c3f7f48
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-13 14:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 13:52 [PATCH] gfs2: fix timestamp handling on quota inodes Jeff Layton
2023-07-13 13:59 ` Christian Brauner
2023-07-13 14:15 ` Andreas Gruenbacher
2023-07-13 14:25 ` Christian Brauner
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).