MCPcopy Index your code
hub / github.com/containerd/btrfs

github.com/containerd/btrfs @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
29 symbols 56 edges 8 files 8 documented · 28% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

go-btrfs

PkgGoDev Build Status Go Report Card

Native Go bindings for btrfs.

Status

These are in the early stages. We will try to maintain stability, but please vendor if you are relying on these directly.

Dependencies

v2.x

Headers from kernel 4.12 or newer. The package name is linux-libc-dev on Debian/Ubuntu, kernel-headers on Fedora and RHEL-like distros.

The headers are only required on compilation time, not on run time.

v1.x

libbtrfs headers. The package name is libbtrfs-dev on Debian/Ubuntu, btrfs-progs-devel on Fedora and CentOS 7. The package is not available for Rocky Linux and AlmaLinux.

Contribute

This package may not cover all the use cases for btrfs. If something you need is missing, please don't hesitate to submit a PR.

Note that due to struct alignment issues, this isn't yet fully native. Preferably, this could be resolved, so contributions in this direction are greatly appreciated.

Applying License Header to New Files

If you submit a contribution that adds a new file, please add the license header. You can do so manually or use the ltag tool:

$ go get github.com/kunalkushwaha/ltag
$ ltag -t ./license-templates

The above will add the appropriate licenses to Go files. New templates will need to be added if other kinds of files are added. Please consult the documentation at https://github.com/kunalkushwaha/ltag

Project details

btrfs is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the: * Project governance, * Maintainers, * and Contributing guidelines

information in our containerd/project repository.

Core symbols most depended-on inside this repo

openSubvolDir
called by 6
btrfs.go
ioctl
called by 5
ioctl.go
uuidString
called by 3
helpers.go
le64ToNative
called by 3
helpers.go
subvolID
called by 2
helpers.go
subvolMap
called by 2
btrfs.go
isFileInfoSubvol
called by 2
btrfs.go
le16ToNative
called by 1
helpers.go

Shape

Function 20
Class 4
Method 3
Struct 1
TypeAlias 1

Languages

Go83%
C10%
C++7%

Modules by API surface

btrfs.go11 symbols
info.go5 symbols
helpers.go5 symbols
btrfs.c3 symbols
cmd/btrfs-test/main.go2 symbols
btrfs.h2 symbols
ioctl.go1 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add btrfs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact