]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - include/xfs_trans.h
libxfs: remove libxfs_trans_iget
[thirdparty/xfsprogs-dev.git] / include / xfs_trans.h
index 63972e4fff0f22dca583f0d8df87a540ef777df3..e6bb74c481ca915bc98f2f6c7fb7e2222eb3f982 100644 (file)
@@ -30,6 +30,7 @@ typedef struct xfs_inode_log_item {
        xfs_log_item_t          ili_item;               /* common portion */
        struct xfs_inode        *ili_inode;             /* inode pointer */
        unsigned short          ili_flags;              /* misc flags */
+       unsigned short          ili_lock_flags;         /* lock flags */
        unsigned int            ili_fields;             /* fields to be logged */
        unsigned int            ili_last_fields;        /* fields when flushed*/
 } xfs_inode_log_item_t;
@@ -60,20 +61,24 @@ typedef struct xfs_qoff_logitem {
        xfs_qoff_logformat_t    qql_format;     /* logged structure */
 } xfs_qoff_logitem_t;
 
+#define XFS_DEFER_OPS_NR_INODES        2       /* join up to two inodes */
+#define XFS_DEFER_OPS_NR_BUFS  2       /* join up to two buffers */
+
 typedef struct xfs_trans {
        unsigned int    t_type;                 /* transaction type */
        unsigned int    t_log_res;              /* amt of log space resvd */
        unsigned int    t_log_count;            /* count for perm log res */
        unsigned int    t_blk_res;              /* # of blocks resvd */
+       xfs_fsblock_t   t_firstblock;           /* first block allocated */
        struct xfs_mount *t_mountp;             /* ptr to fs mount struct */
+       unsigned int    t_blk_res_used;         /* # of resvd blocks used */
        unsigned int    t_flags;                /* misc flags */
        long            t_icount_delta;         /* superblock icount change */
        long            t_ifree_delta;          /* superblock ifree change */
        long            t_fdblocks_delta;       /* superblock fdblocks chg */
        long            t_frextents_delta;      /* superblock freextents chg */
        struct list_head        t_items;        /* first log item desc chunk */
-       struct xfs_defer_ops    *t_agfl_dfops;  /* optional agfl fixup dfops */
-
+       struct list_head        t_dfops;        /* deferred operations */
 } xfs_trans_t;
 
 void   xfs_trans_init(struct xfs_mount *);
@@ -82,13 +87,17 @@ int xfs_trans_roll(struct xfs_trans **);
 int    libxfs_trans_alloc(struct xfs_mount *mp, struct xfs_trans_res *resp,
                           uint blocks, uint rtextents, uint flags,
                           struct xfs_trans **tpp);
+int    libxfs_trans_alloc_rollable(struct xfs_mount *mp, uint blocks,
+                                   struct xfs_trans **tpp);
 int    libxfs_trans_alloc_empty(struct xfs_mount *mp, struct xfs_trans **tpp);
 int    libxfs_trans_commit(struct xfs_trans *);
 void   libxfs_trans_cancel(struct xfs_trans *);
+
+/* cancel dfops associated with a transaction */
+void xfs_defer_cancel(struct xfs_trans *);
+
 struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *, int);
 
-int    libxfs_trans_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
-                               uint, uint, struct xfs_inode **);
 void   libxfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint);
 void   libxfs_trans_ijoin_ref(struct xfs_trans *, struct xfs_inode *, int);
 void   libxfs_trans_log_inode (struct xfs_trans *, struct xfs_inode *,
@@ -141,9 +150,4 @@ libxfs_trans_read_buf(
        return libxfs_trans_read_buf_map(mp, tp, btp, &map, 1, flags, bpp, ops);
 }
 
-void xfs_extent_free_init_defer_op(void);
-void xfs_rmap_update_init_defer_op(void);
-void xfs_refcount_update_init_defer_op(void);
-void xfs_bmap_update_init_defer_op(void);
-
 #endif /* __XFS_TRANS_H__ */