From abd61ca3c333506ffa4ee73b78659ab57e7efcf7 Mon Sep 17 00:00:00 2001 From: Allison Henderson Date: Wed, 11 May 2022 17:01:22 +1000 Subject: xfs: Add log attribute error tag This patch adds an error tag that we can use to test log attribute recovery and replay Signed-off-by: Allison Henderson Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R Signed-off-by: Dave Chinner --- fs/xfs/xfs_attr_item.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/xfs/xfs_attr_item.c') diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c index 56bc231822b3..6d1dcc88abfe 100644 --- a/fs/xfs/xfs_attr_item.c +++ b/fs/xfs/xfs_attr_item.c @@ -24,6 +24,7 @@ #include "xfs_trace.h" #include "xfs_inode.h" #include "xfs_trans_space.h" +#include "xfs_errortag.h" #include "xfs_error.h" #include "xfs_log_priv.h" #include "xfs_log_recover.h" @@ -310,6 +311,11 @@ xfs_xattri_finish_update( XFS_ATTR_OP_FLAGS_TYPE_MASK; int error; + if (XFS_TEST_ERROR(false, args->dp->i_mount, XFS_ERRTAG_LARP)) { + error = -EIO; + goto out; + } + switch (op) { case XFS_ATTR_OP_FLAGS_SET: error = xfs_attr_set_iter(dac); @@ -323,6 +329,7 @@ xfs_xattri_finish_update( break; } +out: /* * Mark the transaction dirty, even on error. This ensures the * transaction is aborted, which: -- cgit v1.2.3