@@ -41,7 +41,6 @@ struct iomap;
#define __round_mask(x, y) ((__typeof__(x))((y)-1))
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
#define unlikely(x) (x)
-#define timespec64 timespec
/*
* This mirrors the kernel include for xfs_buf.h - it's implicitly included in
@@ -31,17 +31,17 @@ struct xfs_inode_log_item;
* metadata.
*/
struct inode {
- mode_t i_mode;
- uint32_t i_uid;
- uint32_t i_gid;
- uint32_t i_nlink;
- xfs_dev_t i_rdev; /* This actually holds xfs_dev_t */
- unsigned long i_state; /* Not actually used in userspace */
- uint32_t i_generation;
- uint64_t i_version;
- struct timespec i_atime;
- struct timespec i_mtime;
- struct timespec i_ctime;
+ mode_t i_mode;
+ uint32_t i_uid;
+ uint32_t i_gid;
+ uint32_t i_nlink;
+ xfs_dev_t i_rdev; /* This actually holds xfs_dev_t */
+ unsigned long i_state; /* Not actually used in userspace */
+ uint32_t i_generation;
+ uint64_t i_version;
+ struct timespec64 i_atime;
+ struct timespec64 i_mtime;
+ struct timespec64 i_ctime;
};
static inline uint32_t i_uid_read(struct inode *inode)
@@ -7,6 +7,13 @@
#ifndef __LIBXFS_API_DEFS_H__
#define __LIBXFS_API_DEFS_H__
+typedef long long int time64_t;
+
+struct timespec64 {
+ time64_t tv_sec; /* seconds */
+ long tv_nsec; /* nanoseconds */
+};
+
/*
* This file defines all the kernel based functions we expose to userspace
* via the libxfs_* namespace. This is kept in a separate header file so
@@ -64,8 +64,6 @@ extern kmem_zone_t *xfs_buf_zone;
extern kmem_zone_t *xfs_inode_zone;
extern kmem_zone_t *xfs_trans_zone;
-#define timespec64 timespec
-
/* fake up iomap, (not) used in xfs_bmap.[ch] */
#define IOMAP_F_SHARED 0x04
#define xfs_bmbt_to_iomap(a, b, c, d) ((void) 0)