diff options
author | Dave Chinner <dchinner@redhat.com> | 2022-05-04 11:46:09 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-05-04 11:46:09 +1000 |
commit | f5b81200b6c166f78b73b3e2ca3e8f0c34c9daaf (patch) | |
tree | 8bf06c90405a7e371bf708b1fe8c7c2e3815698a /fs/xfs/xfs_extfree_item.c | |
parent | 5ddd658ea878f8dbae5ec33dba6cfdabb5056916 (diff) | |
download | lwn-f5b81200b6c166f78b73b3e2ca3e8f0c34c9daaf.tar.gz lwn-f5b81200b6c166f78b73b3e2ca3e8f0c34c9daaf.zip |
xfs: add log item flags to indicate intents
We currently have a couple of helper functions that try to infer
whether the log item is an intent or intent done item from the
combinations of operations it supports. This is incredibly fragile
and not very efficient as it requires checking specific combinations
of ops.
We need to be able to identify intent and intent done items quickly
and easily in upcoming patches, so simply add intent and intent done
type flags to the log item ops flags. These are static flags to
begin with, so intent items should have been typed like this from
the start.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 0e50f2c9348e..21a159f9d8c5 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -307,7 +307,8 @@ xfs_efd_item_release( } static const struct xfs_item_ops xfs_efd_item_ops = { - .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED, + .flags = XFS_ITEM_RELEASE_WHEN_COMMITTED | + XFS_ITEM_INTENT_DONE, .iop_size = xfs_efd_item_size, .iop_format = xfs_efd_item_format, .iop_release = xfs_efd_item_release, @@ -688,6 +689,7 @@ xfs_efi_item_relog( } static const struct xfs_item_ops xfs_efi_item_ops = { + .flags = XFS_ITEM_INTENT, .iop_size = xfs_efi_item_size, .iop_format = xfs_efi_item_format, .iop_unpin = xfs_efi_item_unpin, |