summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_item.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2022-05-04 03:46:39 +0200
committerDave Chinner <david@fromorbit.com>2022-05-04 03:46:39 +0200
commitc23ab603e3d6557bd15e672fdbcbba4b28d08921 (patch)
treee85aa1a0a8d8636b0228928a6b05a8fda0a4e693 /fs/xfs/xfs_bmap_item.c
parentxfs: factor and move some code in xfs_log_cil.c (diff)
downloadlinux-c23ab603e3d6557bd15e672fdbcbba4b28d08921.tar.xz
linux-c23ab603e3d6557bd15e672fdbcbba4b28d08921.zip
xfs: add log item method to return related intents
To apply a whiteout to an intent item when an intent done item is committed, we need to be able to retrieve the intent item from the the intent done item. Add a log item op method for doing this, and wire all the intent done items up to it. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_item.c')
-rw-r--r--fs/xfs/xfs_bmap_item.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index 3d1fa8edf28f..f05663fdb6ff 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -203,12 +203,20 @@ xfs_bud_item_release(
kmem_cache_free(xfs_bud_cache, budp);
}
+static struct xfs_log_item *
+xfs_bud_item_intent(
+ struct xfs_log_item *lip)
+{
+ return &BUD_ITEM(lip)->bud_buip->bui_item;
+}
+
static const struct xfs_item_ops xfs_bud_item_ops = {
.flags = XFS_ITEM_RELEASE_WHEN_COMMITTED |
XFS_ITEM_INTENT_DONE,
.iop_size = xfs_bud_item_size,
.iop_format = xfs_bud_item_format,
.iop_release = xfs_bud_item_release,
+ .iop_intent = xfs_bud_item_intent,
};
static struct xfs_bud_log_item *