Re: [ceph-users] cephfs snap mkdir strange timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 11, 2020 at 11:36:56AM +0100, Marc Roos wrote:
> 
> Sorry I am not really developer nor now details about POSIX/fs's. But if 
> I may ask, why are you getting this time from the parent?

The hidden .snap directory is ceph-specific, and not really POSIX
compliant.  It's handled in a special way and doesn't really have all the
typical directory attributes (such as timestamps).  Hence, the fuse client
is getting these attributes from the parent directory instead of showing
the funny 1970-01-01 (epoch) date.

Cheers,
--
Luis

> 
> 
> 
> -----Original Message-----
> Sent: 11 March 2020 11:32
> To: Jeff Layton
> Cc: Marc Roos; ceph-users; ceph-devel@xxxxxxxxxxxxxxx
> Subject: Re: [ceph-users] cephfs snap mkdir strange timestamp
> 
> On Tue, Mar 10, 2020 at 01:39:29PM -0400, Jeff Layton wrote:
> ...
> > > Signed-off-by: Luis Henriques <lhenriques@xxxxxxxx>
> > > ---
> > >  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
> 
> 



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux