mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
config: remove HAVE_INODE_TIMESPEC64_TIMES
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #16479
This commit is contained in:
committed by
Brian Behlendorf
parent
06c34465b7
commit
80d7f0f98e
@@ -59,11 +59,7 @@ typedef struct timespec timespec_t;
|
||||
#define TIMESPEC_OVERFLOW(ts) \
|
||||
((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX)
|
||||
|
||||
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
typedef struct timespec64 inode_timespec_t;
|
||||
#else
|
||||
typedef struct timespec inode_timespec_t;
|
||||
#endif
|
||||
|
||||
/* Include for Lustre compatibility */
|
||||
#define timestruc_t inode_timespec_t
|
||||
@@ -71,33 +67,22 @@ typedef struct timespec inode_timespec_t;
|
||||
static inline void
|
||||
gethrestime(inode_timespec_t *ts)
|
||||
{
|
||||
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
|
||||
#if defined(HAVE_KTIME_GET_COARSE_REAL_TS64)
|
||||
ktime_get_coarse_real_ts64(ts);
|
||||
#else
|
||||
*ts = current_kernel_time64();
|
||||
#endif /* HAVE_KTIME_GET_COARSE_REAL_TS64 */
|
||||
|
||||
#else
|
||||
*ts = current_kernel_time();
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
gethrestime_sec(void)
|
||||
{
|
||||
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
#if defined(HAVE_KTIME_GET_COARSE_REAL_TS64)
|
||||
inode_timespec_t ts;
|
||||
ktime_get_coarse_real_ts64(&ts);
|
||||
#else
|
||||
inode_timespec_t ts = current_kernel_time64();
|
||||
#endif /* HAVE_KTIME_GET_COARSE_REAL_TS64 */
|
||||
|
||||
#else
|
||||
inode_timespec_t ts = current_kernel_time();
|
||||
#endif
|
||||
return (ts.tv_sec);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user