]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_scrub: fix misclassified error reporting
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Nov 2019 21:55:06 +0000 (17:55 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 1 Nov 2019 21:55:06 +0000 (17:55 -0400)
Fix a few places where we assign error reports to the wrong
classification.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/fscounters.c
scrub/inodes.c
scrub/phase1.c
scrub/xfs_scrub.c

index 98aa3826e7b143e820e06d596a5c620635f6eddf..e064c865d24b8289c59179d2414253d672ef7ea6 100644 (file)
@@ -48,7 +48,7 @@ xfs_count_inodes_ag(
 
        ireq = xfrog_inumbers_alloc_req(64, 0);
        if (!ireq) {
-               str_info(ctx, descr, _("Insufficient memory; giving up."));
+               str_liberror(ctx, ENOMEM, _("allocating inumbers request"));
                return false;
        }
        xfrog_inumbers_set_ag(ireq, agno);
index 7c04d7f6c8c385be5c389f63ae4bcf097b44afc7..71e53bb61136dd47d82578d1bdc8957201dca32a 100644 (file)
@@ -126,13 +126,13 @@ xfs_iterate_inodes_ag(
 
        breq = xfrog_bulkstat_alloc_req(XFS_INODES_PER_CHUNK, 0);
        if (!breq) {
-               str_info(ctx, descr, _("Insufficient memory; giving up."));
+               str_liberror(ctx, ENOMEM, _("allocating bulkstat request"));
                return false;
        }
 
        ireq = xfrog_inumbers_alloc_req(1, 0);
        if (!ireq) {
-               str_info(ctx, descr, _("Insufficient memory; giving up."));
+               str_liberror(ctx, ENOMEM, _("allocating inumbers request"));
                free(breq);
                return false;
        }
index 3211a488a5d58c08b96b2e37f0af7f2705e177be..d040c4a89bcc20fd55cb44f86ee7e512333d9c3e 100644 (file)
@@ -127,7 +127,7 @@ _("Not an XFS filesystem."));
 
        if (!xfs_action_lists_alloc(ctx->mnt.fsgeom.agcount,
                                &ctx->action_lists)) {
-               str_error(ctx, ctx->mntpoint, _("Not enough memory."));
+               str_liberror(ctx, ENOMEM, _("allocating action lists"));
                return false;
        }
 
index 147c114c8fcf3abcfb03ef739026d02cef3a2e0c..e9fc3650de55b333030046064fc80161044bc472 100644 (file)
@@ -738,7 +738,7 @@ main(
                str_info(&ctx, ctx.mntpoint, _("Too many errors; aborting."));
 
        if (debug_tweak_on("XFS_SCRUB_FORCE_ERROR"))
-               str_error(&ctx, ctx.mntpoint, _("Injecting error."));
+               str_info(&ctx, ctx.mntpoint, _("Injecting error."));
 
        /* Clean up scan data. */
        moveon = xfs_cleanup_fs(&ctx);