Closed cmurf closed 1 year ago
We didn't build btrfs-progs 6.3 in Fedora so it could be a regression in 6.3 or 6.3.1.
I am going to bisect it, easily reproduced with make test
on a s390x machine. Unless someone beats me being faster :-)
looks to me 6.3 is OK
c979ffd7872257beeae9ddc930f2be2423597e07 is the first bad commit and 164bc10dfc08d8754d23ef0d6d7281e139d6cd53 is the last good
If access to a s390x system is needed, please let me know, I can arrange that.
Mind to give me the access to an s390x system? You can contact me through wqu@suse.com.
Great thanks to @sharkcz for the s390x machine.
The direct cause is pretty straightforward, by somehow preprocessor didn't define __BIG_ENDIAN__
, so we got incorrect keys and screws up everything.
Still looking into what's the proper macro to use to determine the endian.
You might use AC_C_BIGENDIAN
if autotools are being used or rely on the compiler and __BYTE_ORDER__
being __ORDER_LITTLE_ENDIAN__
or __ORDER_BIG_ENDIAN__
. There are some guides online about the right detection procedures.
I found <bits/endian.h>
from glibc providing all the endianness checks, thus I would go __BYTE_ORDER
checks against __LITTLE_ENDIAN
to send the proper fix.
The synced accessor.h
is using the kernel endianness check, which doesn't work with user space headers.
There is already an endianness check in https://github.com/kdave/btrfs-progs/blob/master/configure.ac#L45, so I would probably go with it, see eg. https://github.com/chrislim2888/IP2Location-C-Library/pull/58/files for usage. Rather than introducing another dependency and method ...
The header is the copy from kernel so we need to use a check that's compatible on the source level, so the autoconf WORD_BIGENDIAN is not suitable here.
kerncompat.h or kernel-lib/bitops.h use bitops.h:#if __BYTE_ORDER == __BIG_ENDIAN
Qu's fix applied to devel.
The header is the copy from kernel so we need to use a check that's compatible on the source level, so the autoconf WORD_BIGENDIAN is not suitable here.
yes, it makes sense, thanks
Downstream Bug 2214522 - Fedora 37: mkfs.btrfs fails on s390 with btrfs-progs 6.3.1 release
System: Fedora 37 Fails on both 6.3 and 6.4 kernels.