Skip to content

Fix: draid autopkgtests fail on s390x architecture (Endianness Issue)#18445

Merged
behlendorf merged 1 commit intoopenzfs:masterfrom
pranavkaruvally:s390x-fix
Apr 22, 2026
Merged

Fix: draid autopkgtests fail on s390x architecture (Endianness Issue)#18445
behlendorf merged 1 commit intoopenzfs:masterfrom
pranavkaruvally:s390x-fix

Conversation

@pranavkaruvally
Copy link
Copy Markdown
Contributor

Motivation and Context

Creating a draid1 pool was resulting in the following error:

cannot create 'pool-smoke-201219': invalid argument for this pool operation

This patch fixes this issue. Closes #16261

Description

The ioctl call to create the pool was returning -1 with errno EINVAL. Inside the module code, inside vdev_draid.c, verify_perms is calling fletcher_4_native_varsize. This in turn calls fletcher_4_scalar_native. So, implemented a fletcher_4_byteswap_varsize which makes use of the fletcher_4_scalar_byteswap in Big endian machines.

How Has This Been Tested?

  • Used draid verify to verify the generated draid maps
  • Created a storage pool on s390x, exported it, imported it on a little endian machine, and verified the checksums of the files within the storage pool. Checked with 10 vdisks of 10 GB each and 10 files of 8 GB each

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf
Copy link
Copy Markdown
Contributor

One last change. To resolve the checkstyle failure you'll need to download the updated ABI files from the PR artifacts here, https://github.com/openzfs/zfs/actions/runs/24707802425?pr=18445. Then add the updated lib/libzfs/libzfs.abi file from that tarball to this PR.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 21, 2026
The ioctl call to create the pool was returning -1 with errno EINVAL.
Inside the module code, inside vdev_draid.c, verify_perms is calling
fletcher_4_native_varsize. This in turn calls fletcher_4_scalar_native.
So, implemented a fletcher_4_byteswap_varsize which makes use of the
fletcher_4_scalar_byteswap in Big endian machines.

Signed-off-by: Pranav P <pranavsdreams@gmail.com>
Closes openzfs#16261
Copy link
Copy Markdown
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we have a few additional recent ABI changes which didn't get flagged initially. Those should have been part of their original commits, but we can fix it up here. Thanks.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 22, 2026
@behlendorf behlendorf merged commit 2eee4ac into openzfs:master Apr 22, 2026
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

draid autopkgtests fail on s390x architecture

4 participants