@@ -1930,8 +1930,14 @@ process_inode_data_fork(
if (*nextents > be64_to_cpu(dino->di_nblocks))
*nextents = 1;
-
- if (dino->di_format != XFS_DINODE_FMT_LOCAL && type != XR_INO_RTDATA)
+ /*
+ * Repair doesn't care about the block maps for regular file data
+ * because it never tries to read data blocks. Only spend time on
+ * constructing a block map for directories, quota files, symlinks,
+ * and realtime space metadata.
+ */
+ if (dino->di_format != XFS_DINODE_FMT_LOCAL &&
+ (type != XR_INO_RTDATA && type != XR_INO_DATA))
*dblkmap = blkmap_alloc(*nextents, XFS_DATA_FORK);
*nextents = 0;