Skip to content

Commit

Permalink
Merge pull request #917 from jakobmoellerdev/s390x-arch
Browse files Browse the repository at this point in the history
fix: reallow building for s390x
  • Loading branch information
llamerada-jp committed May 20, 2024
2 parents cd5027d + 5dc6533 commit bfecbf4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- run: make setup
- run: make check-uncommitted
- run: make test
- run: make build-topolvm GOARCH=s390x
name: "Build TopoLVM for s390x architecture"
- run: make groupname-test

build-images:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ Our supported platform are:

- Kubernetes: 1.29, 1.28, 1.27
- Node OS: Linux with LVM2 (\*1), specifically tested on Ubuntu
- CPU Architecture: x86 (\*2), arm64 (\*3), ppc64le (\*3)
- CPU Architecture: x86 (\*2), arm64 (\*3), ppc64le (\*3), s390x (\*4)
- Filesystems: ext4, xfs, btrfs(experimental)
- lvm version 2.02.163 or later (adds JSON output support)

\*1 The host's Linux Kernel must be v4.9 or later which supports `rmapbt` and `reflink`, if you use xfs filesystem with an official docker image.
\*2 Tier1 support. The official docker images are provided and all functionalities are tested by CI.
\*3 Tier2 support. The official docker images are provided, but no tests run by CI.
\*4 Tier3 support. No docker images are provided, and no tests run by CI, but binaries are built.

Docker images are available on [ghcr.io](https://github.com/orgs/topolvm/packages).

Expand Down
7 changes: 4 additions & 3 deletions internal/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,12 @@ func (s *nodeServerNoLocked) NodeGetVolumeStats(ctx context.Context, req *csi.No

var usage []*csi.VolumeUsage
if sfs.Blocks > 0 {
//nolint:unconvert // explicit conversion of Frsize for s390x.
usage = append(usage, &csi.VolumeUsage{
Unit: csi.VolumeUsage_BYTES,
Total: int64(sfs.Blocks) * sfs.Frsize,
Used: int64(sfs.Blocks-sfs.Bfree) * sfs.Frsize,
Available: int64(sfs.Bavail) * sfs.Frsize,
Total: int64(sfs.Blocks) * int64(sfs.Frsize),
Used: int64(sfs.Blocks-sfs.Bfree) * int64(sfs.Frsize),
Available: int64(sfs.Bavail) * int64(sfs.Frsize),
})
}
if sfs.Files > 0 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/lvmd/proto/lvmd.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/lvmd/proto/lvmd_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bfecbf4

Please sign in to comment.