"xfs_repair -n -v" always returns status 1

Bug #1559219 reported by Oleksandr Suvorov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xfsprogs (Ubuntu)
New
Undecided
Unassigned

Bug Description

xfs_repair mistakenly returns status 1 instead of 0 for any "clean" xfs-filesystem if there "-v" and "-n" options are used together.

# xfs_repair -V
xfs_repair version 4.3.0

Run xfs_repair w/o -v:

# xfs_repair -n /dev/DEV; echo Status=$?
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan (but don't clear) agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
No modify flag set, skipping phase 5
Phase 6 - check inode connectivity...
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify link counts...
No modify flag set, skipping filesystem flush and exiting.
Status=0

Add -v:

===========
Actual result:
===========

# xfs_repair -v -n /dev/DEV; echo Status=$?
Phase 1 - find and verify superblock...
        - block cache size set to 185752 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 2 tail block 2
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan (but don't clear) agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
No modify flag set, skipping phase 5
Phase 6 - check inode connectivity...
        - traversing filesystem ...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify link counts...
No modify flag set, skipping filesystem flush and exiting.

        XFS_REPAIR Summary Fri Mar 18 18:18:37 2016

Phase Start End Duration
Phase 1: 03/18 18:18:37 03/18 18:18:37
Phase 2: 03/18 18:18:37 03/18 18:18:37
Phase 3: 03/18 18:18:37 03/18 18:18:37
Phase 4: 03/18 18:18:37 03/18 18:18:37
Phase 5: Skipped
Phase 6: 03/18 18:18:37 03/18 18:18:37
Phase 7: 03/18 18:18:37 03/18 18:18:37

Total run time:
Status=1

=============
Expected result:
=============
Status=0

Revision history for this message
Oleksandr Suvorov (mrcry0) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.