lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <74edd943c8899218683d6e9c3e6929a168470748.camel@kernel.org>
Date: Wed, 02 Oct 2024 08:32:07 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Jan Kara <jack@...e.cz>
Cc: John Stultz <jstultz@...gle.com>, Thomas Gleixner <tglx@...utronix.de>, 
 Stephen Boyd <sboyd@...nel.org>, Alexander Viro <viro@...iv.linux.org.uk>,
 Christian Brauner <brauner@...nel.org>, Steven Rostedt
 <rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>, Mathieu
 Desnoyers <mathieu.desnoyers@...icios.com>,  Jonathan Corbet
 <corbet@....net>, Randy Dunlap <rdunlap@...radead.org>, Chandan Babu R
 <chandan.babu@...cle.com>, "Darrick J. Wong" <djwong@...nel.org>, Theodore
 Ts'o <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>, Chris
 Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba
 <dsterba@...e.com>,  Hugh Dickins <hughd@...gle.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Chuck Lever <chuck.lever@...cle.com>, Vadim
 Fedorenko <vadim.fedorenko@...ux.dev>,  linux-kernel@...r.kernel.org,
 linux-fsdevel@...r.kernel.org,  linux-trace-kernel@...r.kernel.org,
 linux-doc@...r.kernel.org,  linux-xfs@...r.kernel.org,
 linux-ext4@...r.kernel.org,  linux-btrfs@...r.kernel.org,
 linux-nfs@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v8 02/12] fs: add infrastructure for multigrain
 timestamps

On Wed, 2024-10-02 at 11:14 +0200, Jan Kara wrote:
> On Tue 01-10-24 09:34:18, Jeff Layton wrote:
> > On Tue, 2024-10-01 at 15:20 +0200, Jan Kara wrote:
> > > > diff --git a/fs/stat.c b/fs/stat.c
> > > > index 41e598376d7e..381926fb405f 100644
> > > > --- a/fs/stat.c
> > > > +++ b/fs/stat.c
> > > > @@ -26,6 +26,35 @@
> > > >  #include "internal.h"
> > > >  #include "mount.h"
> > > >  
> > > > +/**
> > > > + * fill_mg_cmtime - Fill in the mtime and ctime and flag ctime as QUERIED
> > > > + * @stat: where to store the resulting values
> > > > + * @request_mask: STATX_* values requested
> > > > + * @inode: inode from which to grab the c/mtime
> > > > + *
> > > > + * Given @inode, grab the ctime and mtime out if it and store the result
> > > 						 ^^ of
> > > 
> > > > + * in @stat. When fetching the value, flag it as QUERIED (if not already)
> > > > + * so the next write will record a distinct timestamp.
> > > > + */
> > > > +void fill_mg_cmtime(struct kstat *stat, u32 request_mask, struct inode *inode)
> > > > +{
> > > 
> > > Given how things worked out in the end, it seems this function doesn't need
> > > to handle mtime at all and we can move mtime handling back to shared generic
> > > code?
> > > 
> > 
> > I don't think we can. The mtime is effectively derived from the ctime.
> > 
> > If I query only the mtime, I think it's reasonable to expect that it
> > will change if there is another write, even if I don't query the ctime.
> > We won't get that unless we can also set the flag in the ctime when
> > only the mtime is requested.
> 
> Aha, right. I already forgot about this :). Can you please add to the
> comment the above explanation so that we remember next time somebody wants
> to "clean this up" like me ;)? Thanks!
> 
> Also feel free to add:
> 
> Reviewed-by: Jan Kara <jack@...e.cz>
> 
> 								Honza

Done, and the revised version is in my tree.

Thanks for the review!
-- 
Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ