void libxfs_trans_binval(struct xfs_trans *, struct xfs_buf *);
void libxfs_trans_bjoin(struct xfs_trans *, struct xfs_buf *);
void libxfs_trans_bhold(struct xfs_trans *, struct xfs_buf *);
+void libxfs_trans_dirty_buf(struct xfs_trans *, struct xfs_buf *);
void libxfs_trans_log_buf(struct xfs_trans *, struct xfs_buf *,
uint, uint);
bool libxfs_trans_ordered_buf(xfs_trans_t *, struct xfs_buf *);
#define xfs_trans_ijoin_ref libxfs_trans_ijoin_ref
#define xfs_trans_init libxfs_trans_init
#define xfs_trans_inode_alloc_buf libxfs_trans_inode_alloc_buf
+#define xfs_trans_dirty_buf libxfs_trans_dirty_buf
#define xfs_trans_log_buf libxfs_trans_log_buf
#define xfs_trans_ordered_buf libxfs_trans_ordered_buf
#define xfs_trans_log_inode libxfs_trans_log_inode
}
+/*
+ * Mark a buffer dirty in the transaction.
+ */
+void
+libxfs_trans_dirty_buf(
+ struct xfs_trans *tp,
+ struct xfs_buf *bp)
+{
+ struct xfs_buf_log_item *bip;
+
+ ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp);
+ ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL);
+
+ bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *);
+#ifdef XACT_DEBUG
+ fprintf(stderr, "dirtied buffer %p, transaction %p\n", bp, tp);
+#endif
+ tp->t_flags |= XFS_TRANS_DIRTY;
+ bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY;
+}
+
/*
* This is called to mark bytes first through last inclusive of the given
* buffer as needing to be logged when the transaction is committed.
*/
void
libxfs_trans_log_buf(
- xfs_trans_t *tp,
- xfs_buf_t *bp,
+ struct xfs_trans *tp,
+ struct xfs_buf *bp,
uint first,
uint last)
{
- xfs_buf_log_item_t *bip;
+ struct xfs_buf_log_item *bip;
- ASSERT(XFS_BUF_FSPRIVATE2(bp, xfs_trans_t *) == tp);
- ASSERT(XFS_BUF_FSPRIVATE(bp, void *) != NULL);
ASSERT((first <= last) && (last < XFS_BUF_COUNT(bp)));
-#ifdef XACT_DEBUG
- fprintf(stderr, "dirtied buffer %p, transaction %p\n", bp, tp);
-#endif
bip = XFS_BUF_FSPRIVATE(bp, xfs_buf_log_item_t *);
- tp->t_flags |= XFS_TRANS_DIRTY;
- bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY;
+ xfs_trans_dirty_buf(tp, bp);
xfs_buf_item_log(bip, first, last);
}