Bug 2183398

Summary: xfsprogs: xfs_repair progress reporting is not working
Product: Red Hat Enterprise Linux 8 Reporter: Donald Douwsma <ddouwsma>
Component: xfsprogsAssignee: Pavel Reichl <preichl>
Status: VERIFIED --- QA Contact: Murphy Zhou <xzhou>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.0CC: dwysocha, preichl, xzhou
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.8   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xfsprogs-5.0.0-12.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Donald Douwsma 2023-03-31 02:35:24 UTC
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

Comment 6 Donald Douwsma 2023-05-31 07:02:52 UTC
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/