struct inode {
mode_t i_mode;
uint32_t i_nlink;
+ xfs_dev_t i_rdev; /* This actually holds xfs_dev_t */
uint32_t i_generation;
uint64_t i_version;
struct timespec i_atime;
struct inode i_vnode;
} xfs_inode_t;
+/* Convert from vfs inode to xfs inode */
+static inline struct xfs_inode *XFS_I(struct inode *inode)
+{
+ return container_of(inode, struct xfs_inode, i_vnode);
+}
+
+/* convert from xfs inode to vfs inode */
static inline struct inode *VFS_I(struct xfs_inode *ip)
{
return &ip->i_vnode;
}
+/* We only have i_size in the xfs inode in userspace */
+static inline loff_t i_size_read(struct inode *inode)
+{
+ return XFS_I(inode)->i_size;
+}
+
/*
* wrappers around the mode checks to simplify code
*/
extern int libxfs_iflush_int (struct xfs_inode *, struct xfs_buf *);
/* Inode Cache Interfaces */
+extern bool libxfs_inode_verify_forks(struct xfs_inode *ip,
+ struct xfs_ifork_ops *);
extern int libxfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
- uint, struct xfs_inode **);
+ uint, struct xfs_inode **,
+ struct xfs_ifork_ops *);
extern void libxfs_iput(struct xfs_inode *);
#define IRELE(ip) libxfs_iput(ip)