Crates.io | bcachefs-ioctls |
lib.rs | bcachefs-ioctls |
version | 0.1.0 |
created_at | 2025-03-31 19:10:23.73949+00 |
updated_at | 2025-03-31 19:10:23.73949+00 |
description | A more ergonomic wrapper around bcachefs' ioctl interface. |
homepage | https://git.sr.ht/~taliaferro/bcachefs-ioctls |
repository | https://git.sr.ht/~taliaferro/bcachefs-ioctls |
max_upload_size | |
id | 1613830 |
size | 40,207 |
A more ergonomic wrapper around bcachefs' ioctl interface.
(source)
:warning: This crate is still a work-in-progress, and bcachefs itself still describes itself as "beta quality". This crate's interface might change, as might the underlying kernel APIs it uses. Not all ioctls are yet implemented.
To use this crate in your project, run:
cargo add bcachefs-ioctls
Integration tests can be found in the tests/
directory. Note that these are
integration tests, so they need to actually interact with a real kernel and a
real filesystem. To this end, running the tests will create a 1GB file called
.test_data/bcachefs.raw
and mount it at .test_data/mountpoint
. Because
mounting the filesystem and using these ioctls requires root, so do the tests.
(Cargo is configured to use sudo
to escalate to root when running the tests.)
Copyright 2025 James Taliaferro
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.