Re: [PATCH 2/2] xfs: sync up xfs_trans_inode with userspace

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

 




On 7/15/19 5:22 PM, 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;

        struct timespec64 tv;


        struct timespec64       i_atime;
        struct timespec64       i_mtime;
        struct timespec64       i_ctime;

...

        xfs_timestamp_t di_crtime;      /* time created */


bzzzzt.

will take a bit more work I think :(




> And convert userspace over to the same :P
> 
> Cheers,
> 
> Dave.
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux