]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
fsr: always print error messages from xfrog_defragrange()
authorCarlos Maiolino <cem@kernel.org>
Tue, 7 Apr 2026 11:15:00 +0000 (13:15 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 8 Apr 2026 19:39:57 +0000 (21:39 +0200)
Error messages from xfrog_defragrange() are only printed when
verbose/debug flags are used.

We had reports from users complaining it's hard to find out the error
messages lost in the middle of dozens of other informational messages.

Change packfile() behavior to print errors independently of verbose or
debug flags.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
fsr/xfs_fsr.c

index 390f7c5276df55bcce89ac7293efb1c6618c6ddc..e74180c143beff043cbf2ec6c282c706cb66f545 100644 (file)
@@ -1464,19 +1464,15 @@ packfile(
                case 0:
                        break;
        case ENOTSUP:
-               if (vflag || dflag)
-                       fsrprintf(_("%s: file type not supported\n"), fname);
+               fsrprintf(_("%s: file type not supported\n"), fname);
                break;
        case EFAULT:
                /* The file has changed since we started the copy */
-               if (vflag || dflag)
-                       fsrprintf(_("%s: file modified defrag aborted\n"),
-                                       fname);
+               fsrprintf(_("%s: file modified defrag aborted\n"), fname);
                break;
        case EBUSY:
                /* Timestamp has changed or mmap'ed file */
-               if (vflag || dflag)
-                       fsrprintf(_("%s: file busy\n"), fname);
+               fsrprintf(_("%s: file busy\n"), fname);
                break;
        default:
                fsrprintf(_("XFS_IOC_SWAPEXT failed: %s: %s\n"),