> + */ > +static inline xfs_ictimestamp_t > +xfs_inode_to_log_dinode_ts( > + const struct timespec64 tv) > +{ > + uint64_t t; > + > +#ifdef __LITTLE_ENDIAN > + t = ((uint64_t)tv.tv_nsec << 32) | ((uint64_t)tv.tv_sec & 0xffffffff); > +#elif __BIG_ENDIAN > + t = ((int64_t)tv.tv_sec << 32) | ((uint64_t)tv.tv_nsec & 0xffffffff); > +#else > +# error System is neither little nor big endian? > +#endif > + return t; Looking at this I wonder if we should just keep the struct and cast to it locally in the conversion functions, as that should take care of everything. Or just keep the union from the previous version, sorry..