Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-76142

erofs filesystem UUID not shown correctly by file on little endian arches

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.0
    • file
    • None
    • No
    • Moderate
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      The file utility doesn't print correctly the filesystem UUID of an erofs image on x86_64, aarch64 and ppc64le. An example from x86_64:

      [root@kvm-03-guest16 ~]# mkdir test
      [root@kvm-03-guest16 ~]# mkfs.erofs test_x86_64.img test
      mkfs.erofs 1.8.4
      Build completed.
      ------
      Filesystem UUID: 6445a18d-62a5-4a06-ad2a-dafddcce2886
      Filesystem total blocks: 1 (of 4096-byte blocks)
      Filesystem total inodes: 1
      Filesystem total metadata blocks: 1
      Filesystem total deduplicated bytes (of source files): 0
      [root@kvm-03-guest16 ~]#
      [root@kvm-03-guest16 ~]# blkid test_x86_64.img 
      test_x86_64.img: UUID="6445a18d-62a5-4a06-ad2a-dafddcce2886" BLOCK_SIZE="4096" TYPE="erofs"
      [root@kvm-03-guest16 ~]#
      [root@kvm-03-guest16 ~]# file test_x86_64.img
      test_x86_64.img: EROFS filesystem, compat: SB_CHKSUM MTIME, blocksize=12, exslots=0, uuid=8DA14564-A562-064A-AD2A-DAFDDCCE2886
      [root@kvm-03-guest16 ~]#
      

       
      On s390x (big endian), the UUID is printed correctly:

      [root@s390x-kvm-106 ~]# mkdir test
      [root@s390x-kvm-106 ~]# mkfs.erofs test_s390x.img test
      mkfs.erofs 1.8.4
      Build completed.
      ------
      Filesystem UUID: 9fdd10bb-33fc-48c7-9f93-f9258c881b70
      Filesystem total blocks: 1 (of 4096-byte blocks)
      Filesystem total inodes: 1
      Filesystem total metadata blocks: 1
      Filesystem total deduplicated bytes (of source files): 0
      [root@s390x-kvm-106 ~]# blkid test_s390x.img 
      test_s390x.img: UUID="9fdd10bb-33fc-48c7-9f93-f9258c881b70" BLOCK_SIZE="4096" TYPE="erofs"
      [root@s390x-kvm-106 ~]# file test_s390x.img 
      test_s390x.img: EROFS filesystem, compat: SB_CHKSUM MTIME, blocksize=12, exslots=0, uuid=9FDD10BB-33FC-48C7-9F93-F9258C881B70
      [root@s390x-kvm-106 ~]#
      

      Please provide the package NVR for which the bug is seen:

      erofs-utils-1.8.4-2.el10
      util-linux-core-2.40.2-5.el10
      file-5.45-7.el10

      How reproducible is this bug?:

      Always on little endian architectures.

      Steps to reproduce

      1. mkdir test
      2. mkfs.erofs test_x86_64.img test
      3. file test_x86_64.img

      Expected results

      Incorrect UUID printed - parts of the UUID are swapped.

      Actual results

      UUID printed correctly.

              vmihalko Vincent Mihalkovic
              jstodola@redhat.com Jan Stodola
              Vincent Mihalkovic Vincent Mihalkovic
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: