Description of problem: xfs_repair progress reporting is broken. Version-Release number of selected component (if applicable): xfsprogs-5.0.0-10.el8.x86_64 How reproducible: Always Steps to Reproduce: Run xfs_repair on a large filesystem using `xfs_repair -o ag_stride=4 -t 1` or use the (unmerged) xfstest from https://lore.kernel.org/linux-xfs/20200817075313.1484879-1-ddouwsma@redhat.com/ Actual results: # xfs_repair -o ag_stride=4 -t 1 Phase 1 - find and verify superblock... - reporting progress in intervals of 1 second Phase 2 - using internal log - zero log... - scan filesystem freespace and inode maps... - 11:14:16: scanning filesystem freespace - 4 of 4 allocation groups done - found root inode chunk Phase 3 - for each AG... - scan and clear agi unlinked lists... - 11:14:16: scanning agi unlinked lists - 4 of 4 allocation groups done - process known inodes and perform inode discovery... - agno = 0 - agno = 1 - agno = 2 - agno = 3 ... Expected results: # xfs_repair -o ag_stride=4 -t 1 Phase 1 - find and verify superblock... - reporting progress in intervals of 1 second Phase 2 - using internal log - zero log... - 12:05:06: scanning filesystem freespace - 0 of 0 allocation groups done - 12:05:07: scanning filesystem freespace - 0 of 0 allocation groups done - scan filesystem freespace and inode maps... - 12:05:08: scanning filesystem freespace - 0 of 4 allocation groups done - 12:05:08: scanning filesystem freespace - 4 of 4 allocation groups done - found root inode chunk Phase 3 - for each AG... - scan and clear agi unlinked lists... - 12:05:08: scanning agi unlinked lists - 4 of 4 allocation groups done - process known inodes and perform inode discovery... - agno = 0 - 12:05:09: process known inodes and inode discovery - 320 of 46208 inodes done - 12:05:09: Phase 3: elapsed time 1 second - processed 19200 inodes per minute - 12:05:09: Phase 3: 0% done - estimated remaining time 2 minutes, 23 seconds - 12:05:10: process known inodes and inode discovery - 320 of 46208 inodes done - 12:05:10: Phase 3: elapsed time 2 seconds - processed 9600 inodes per minute
An attempt at fixing the regression test for this has been submitted upstream. https://lore.kernel.org/linux-xfs/20230531064024.1737213-1-ddouwsma@redhat.com/