Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions

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

 



On Thu, 2023-07-06 at 12:53 +0200, Jan Kara wrote:
> 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@xxxxxxxxxx>
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> 
> 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@xxxxxxx>
> 

Thanks. Fixed in my tree.
-- 
Jeff Layton <jlayton@xxxxxxxxxx>




[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