From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Henriques Subject: Re: [ceph-users] cephfs snap mkdir strange timestamp Date: Wed, 11 Mar 2020 10:31:42 +0000 Message-ID: <20200311103142.GA6863@suse.com> References: <"H000007100163fdf.1583792359.sx.f1-outsourcing.eu*"@MHS> <"H000007100164304.1583836879.sx.f1-outsourcing.eu*"@MHS> <20200310134613.GA74810@suse.com> <7f684a1a23c007858d996346532971bd0de9f138.camel@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx2.suse.de ([195.135.220.15]:42372 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbgCKKbp (ORCPT ); Wed, 11 Mar 2020 06:31:45 -0400 Content-Disposition: inline In-Reply-To: <7f684a1a23c007858d996346532971bd0de9f138.camel@kernel.org> Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Jeff Layton Cc: Marc Roos , ceph-users , ceph-devel@vger.kernel.org On Tue, Mar 10, 2020 at 01:39:29PM -0400, Jeff Layton wrote: ... > > Signed-off-by: Luis Henriques > > --- > > fs/ceph/inode.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c > > index d01710a16a4a..f4e78ade0871 100644 > > --- a/fs/ceph/inode.c > > +++ b/fs/ceph/inode.c > > @@ -82,6 +82,8 @@ struct inode *ceph_get_snapdir(struct inode *parent) > > inode->i_mode = parent->i_mode; > > inode->i_uid = parent->i_uid; > > inode->i_gid = parent->i_gid; > > + inode->i_mtime = parent->i_mtime; > > + inode->i_ctime = parent->i_ctime; > > inode->i_op = &ceph_snapdir_iops; > > inode->i_fop = &ceph_snapdir_fops; > > ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */ > > What about the atime, and the ci->i_btime ? Yeah, probably makes sense too, although the fuse client doesn't seem to touch atime (it does change btime, I missed that). I'll send v2 in a bit. Cheers, -- Luis