diff mbox series

[01/17] xfs: document the ri_total validation in xlog_recover_attri_commit_pass2

Message ID 167899414371.15363.10228100545681436326.stgit@frogsfrogsfrogs (mailing list archive)
State New, archived
Headers show
Series xfs: encode parent pointer name in xattr key | expand

Commit Message

Darrick J. Wong March 16, 2023, 7:21 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Leave comments explaining why log recovery wants the log item buffer
counts to be what they are.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_attr_item.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c
index da807f286a09..dac5d9cfc804 100644
--- a/fs/xfs/xfs_attr_item.c
+++ b/fs/xfs/xfs_attr_item.c
@@ -769,6 +769,7 @@  xlog_recover_attri_commit_pass2(
 	switch (op) {
 	case XFS_ATTRI_OP_FLAGS_SET:
 	case XFS_ATTRI_OP_FLAGS_REPLACE:
+		/* Log item, attr name, attr value */
 		if (item->ri_total != 3) {
 			XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp,
 					     attri_formatp, len);
@@ -776,6 +777,7 @@  xlog_recover_attri_commit_pass2(
 		}
 		break;
 	case XFS_ATTRI_OP_FLAGS_REMOVE:
+		/* Log item, attr name */
 		if (item->ri_total != 2) {
 			XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp,
 					     attri_formatp, len);
@@ -783,6 +785,7 @@  xlog_recover_attri_commit_pass2(
 		}
 		break;
 	case XFS_ATTRI_OP_FLAGS_NVREPLACE:
+		/* Log item, attr name, new attr name, attr value */
 		if (item->ri_total != 4) {
 			XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp,
 					     attri_formatp, len);