Skip to content

btrfs: use native go snapshotter implementation#5658

Closed
AkihiroSuda wants to merge 1 commit intocontainerd:mainfrom
AkihiroSuda:btrfs-no-cgo
Closed

btrfs: use native go snapshotter implementation#5658
AkihiroSuda wants to merge 1 commit intocontainerd:mainfrom
AkihiroSuda:btrfs-no-cgo

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

Replace github.com/containerd/btrfs with github.com/dennwc/btrfs to eliminate cgo dependency.

How to test: go test -c ./snapshots/btrfs && sudo ./btrfs.test -test.root -test.v

Fix #5654
Fix containerd/btrfs#7

Based on Denys Smirnov (@dennwc)'s attempt in 2019: dennwc@3728f96

@AkihiroSuda
Copy link
Copy Markdown
Member Author

cc @dennwc @stevvooe

@AkihiroSuda

This comment has been minimized.

@AkihiroSuda AkihiroSuda added this to the 1.6 milestone Jun 25, 2021
@dennwc
Copy link
Copy Markdown

dennwc commented Jun 25, 2021

Merged the PR, thanks a lot for pushing this forward :)

Replace containerd/btrfs with dennwc/btrfs to eliminate cgo dependency.

How to test: `go test -c ./snapshots/btrfs && sudo ./btrfs.test -test.root -test.v`

Fix issue 5654
Fix containerd/btrfs issue 7

Based on Denys Smirnov's attempt in 2019: dennwc@3728f96

Co-authored-by: Denys Smirnov
Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Copy Markdown
Member Author

Thanks @dennwc !

Comment on lines -52 to -55
libseccomp-dev:amd64 \
libseccomp-dev:arm64 \
libseccomp-dev:s390x \
libseccomp-dev:ppc64el \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't need the libseccomp-dev packages anymore either?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't need libseccomp-dev since 7332e2a

Copy link
Copy Markdown
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM on the code to switch; any thoughts as to supported nature/any concerns around a single-person Go project (other than your PR to fix 32-bit ARM)? :) I realize we "blindly" depended on libbtrfs from distros prior to this, but curious if any reason to think about that?

@AkihiroSuda
Copy link
Copy Markdown
Member Author

@dennwc

If you like, can we migrate the code to https://github.com/containerd/btrfs (as github.com/containerd/btrfs/v2 go module) and add you as a non-core maintainer of that repo? (Core maintainers also maintain the repo, too)

@dennwc
Copy link
Copy Markdown

dennwc commented Jun 29, 2021

Sure, sounds good! Do you need anything from my side in regards to the old repo?

@AkihiroSuda
Copy link
Copy Markdown
Member Author

Thanks, could you relicense the code to Apache License 2.0 (required by CNCF)?

Then I (or whoever) can open a PR in https://github.com/containerd/btrfs to add "/v2" module with your code.

@dennwc
Copy link
Copy Markdown

dennwc commented Jun 29, 2021

Done!

@AkihiroSuda
Copy link
Copy Markdown
Member Author

Thanks, opened containerd/btrfs#34

@AkihiroSuda AkihiroSuda marked this pull request as draft July 15, 2021 05:38
Copy link
Copy Markdown
Member

@stevvooe stevvooe left a comment

Choose a reason for hiding this comment

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

Not LGTM

Existing bindings can be made to not use cgo without breaking the interface. Rejection is in containerd/btrfs#34 (comment) with pointers on how to avoid cgo for struct unpacking.

@dmcgowan dmcgowan removed this from the 1.6 milestone Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove necessity to link against C package Replace containerd/btrfs with dennwc/btrfs to eliminate cgo dependency

6 participants