summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_attr_item.c
diff options
context:
space:
mode:
authorAllison Henderson <allison.henderson@oracle.com>2022-05-11 10:01:22 +0300
committerDave Chinner <david@fromorbit.com>2022-05-11 10:01:22 +0300
commitabd61ca3c333506ffa4ee73b78659ab57e7efcf7 (patch)
treebe14b9a02557c46fab5a5a577e789c7b3871631d /fs/xfs/xfs_attr_item.c
parent73159fc27c6944ebe55e6652d6a1981d7cb3eb4a (diff)
downloadlinux-abd61ca3c333506ffa4ee73b78659ab57e7efcf7.tar.xz
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 <allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_attr_item.c')
-rw-r--r--fs/xfs/xfs_attr_item.c7
1 files changed, 7 insertions, 0 deletions
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: