Support for btrfs zstd decompression

Hi everyone!
Need some help regarding ARM64. I recently submitted patch for zstd decompression for btrfs (inline content) https://review.haiku-os.org/c/haiku/+/10309.
On my system it is working fine, but there is build failure in gerrit, saying don’t know how to make kernel_libzstd.a. Although it passes on x86 and other but not on arm64. I am unable to figure it out. Thanks!

It seems it’s because zstd is not available as a build feature in arm64. There’s a message saying so at the begginning of the log, and I don’t see the packages in build/jam/repositories/HaikuPorts/arm64.

I see ZstdCompressionAlgorithm compiles fine via a lot of #ifdef ZSTD_ENABLED choosing whether to do something or return B_NOT_SUPPORTED.

1 Like

This commit could give you some inspiration:

1 Like

Thanks @madmax and @korli !
The advice was spot on. I wrapped the logic in #ifdef ZSTD_ENABLED and updated the jam file accordingly.
The build has now passed for all architectures (including arm64)
Now that inline extent is working, I’ll shift my focus on regular extents.
Thanks again!

1 Like

Please check again the link above against your change. It looks like some parts are missing.