summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-29 04:27:32 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-29 04:27:32 +0200
commit9ce632a28a41bd9aeeaa3913d95b23648a82c2ee (patch)
treebe33e14549bbef071ce6b0d23f45012a6876d437 /fs/xfs/xfs_trans.h
parentxfs: split iop_unlock (diff)
downloadlinux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.tar.xz
linux-9ce632a28a41bd9aeeaa3913d95b23648a82c2ee.zip
xfs: add a flag to release log items on commit
We have various items that are released from ->iop_comitting. Add a flag to just call ->iop_release from the commit path to avoid tons of boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_trans.h')
-rw-r--r--fs/xfs/xfs_trans.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 522c1d565aa4..ef5fd5db5350 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -67,6 +67,7 @@ typedef struct xfs_log_item {
{ (1 << XFS_LI_DIRTY), "DIRTY" }
struct xfs_item_ops {
+ unsigned flags;
void (*iop_size)(xfs_log_item_t *, int *, int *);
void (*iop_format)(xfs_log_item_t *, struct xfs_log_vec *);
void (*iop_pin)(xfs_log_item_t *);
@@ -78,6 +79,12 @@ struct xfs_item_ops {
void (*iop_error)(xfs_log_item_t *, xfs_buf_t *);
};
+/*
+ * Release the log item as soon as committed. This is for items just logging
+ * intents that never need to be written back in place.
+ */
+#define XFS_ITEM_RELEASE_WHEN_COMMITTED (1 << 0)
+
void xfs_log_item_init(struct xfs_mount *mp, struct xfs_log_item *item,
int type, const struct xfs_item_ops *ops);