#ifndef __XFS_INODE_UTIL_H__
#define __XFS_INODE_UTIL_H__
struct xfs_icluster;
uint16_t xfs_flags2diflags(struct xfs_inode *ip, unsigned int xflags);
uint64_t xfs_flags2diflags2(struct xfs_inode *ip, unsigned int xflags);
uint32_t xfs_dic2xflags(struct xfs_inode *ip);
uint32_t xfs_ip2xflags(struct xfs_inode *ip);
prid_t xfs_get_initial_prid(struct xfs_inode *dp);
struct xfs_icreate_args {
struct mnt_idmap *idmap;
struct xfs_inode *pip;
dev_t rdev;
umode_t mode;
#define XFS_ICREATE_TMPFILE (1U << 0)
#define XFS_ICREATE_INIT_XATTRS (1U << 1)
#define XFS_ICREATE_UNLINKABLE (1U << 2)
uint16_t flags;
};
#define XFS_ICHGTIME_MOD 0x1
#define XFS_ICHGTIME_CHG 0x2
#define XFS_ICHGTIME_CREATE 0x4
#define XFS_ICHGTIME_ACCESS 0x8
void xfs_trans_ichgtime(struct xfs_trans *tp, struct xfs_inode *ip, int flags);
void xfs_inode_init(struct xfs_trans *tp, const struct xfs_icreate_args *args,
struct xfs_inode *ip);
int xfs_inode_uninit(struct xfs_trans *tp, struct xfs_perag *pag,
struct xfs_inode *ip, struct xfs_icluster *xic);
int xfs_iunlink(struct xfs_trans *tp, struct xfs_inode *ip);
int xfs_iunlink_remove(struct xfs_trans *tp, struct xfs_perag *pag,
struct xfs_inode *ip);
int xfs_droplink(struct xfs_trans *tp, struct xfs_inode *ip);
void xfs_bumplink(struct xfs_trans *tp, struct xfs_inode *ip);
#endif