OSDN Git Service

xfs: report unrecognized log item type codes during recovery
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 21 Apr 2020 21:16:52 +0000 (14:16 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 May 2020 16:03:14 +0000 (09:03 -0700)
When we're sorting recovered log items ahead of recovering them and
encounter a log item of unknown type, actually print the type code when
we're rejecting the whole transaction to aid in debugging.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_log_recover.c

index 11c3502..5f80308 100644 (file)
@@ -1887,8 +1887,8 @@ xlog_recover_reorder_trans(
                        break;
                default:
                        xfs_warn(log->l_mp,
-                               "%s: unrecognized type of log operation",
-                               __func__);
+                               "%s: unrecognized type of log operation (%d)",
+                               __func__, ITEM_TYPE(item));
                        ASSERT(0);
                        /*
                         * return the remaining items back to the transaction