On 7/15/19 7:03 PM, Darrick J. Wong wrote: > On Tue, Jul 16, 2019 at 08:22:09AM +1000, Dave Chinner wrote: >> On Fri, Jul 12, 2019 at 12:46:17PM -0500, Eric Sandeen wrote: >>> Add an XFS_ICHGTIME_CREATE case to xfs_trans_ichgtime() to keep in >>> sync with userspace. (Currently no kernel caller sends this flag.) >>> >>> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> >>> --- >>> >>> diff --git a/fs/xfs/libxfs/xfs_trans_inode.c b/fs/xfs/libxfs/xfs_trans_inode.c >>> index 93d14e47269d..a9ad90926b87 100644 >>> --- a/fs/xfs/libxfs/xfs_trans_inode.c >>> +++ b/fs/xfs/libxfs/xfs_trans_inode.c >>> @@ -66,6 +66,10 @@ xfs_trans_ichgtime( >>> inode->i_mtime = tv; >>> if (flags & XFS_ICHGTIME_CHG) >>> inode->i_ctime = tv; >>> + if (flags & XFS_ICHGTIME_CREATE) { >>> + ip->i_d.di_crtime.t_sec = (int32_t)tv.tv_sec; >>> + ip->i_d.di_crtime.t_nsec = (int32_t)tv.tv_nsec; >>> + } >> >> Please use the same format as the rest of the function. i.e. >> >> if (flags & XFS_ICHGTIME_CREATE) >> ip->i_d.di_crtime = tv; >> >> And convert userspace over to the same :P > > How about promoting crtime to struct inode while we're at it? > > (That said I think Eric was going for the quick resync now to keep > kernel libxfs in sync with xfsprogs libxfs...) well, yeah but we don't have to pollute crap just to save 4 lines in a diff. I'm ok with moving the file and leaving this delta there for now if we need to work harder on those last 4 lines of diff ;) -Eric