summaryrefslogtreecommitdiff
path: root/bch_bindgen
diff options
context:
space:
mode:
Diffstat (limited to 'bch_bindgen')
-rw-r--r--bch_bindgen/build.rs1
-rw-r--r--bch_bindgen/src/bkey.rs2
-rw-r--r--bch_bindgen/src/libbcachefs_wrapper.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/bch_bindgen/build.rs b/bch_bindgen/build.rs
index 22d702b2..b9f7eb65 100644
--- a/bch_bindgen/build.rs
+++ b/bch_bindgen/build.rs
@@ -85,6 +85,7 @@ fn main() {
.opaque_type("gc_stripe")
.opaque_type("open_bucket.*")
.opaque_type("replicas_delta_list")
+ .allowlist_type("sb_names")
.no_copy("btree_trans")
.no_copy("printbuf")
.no_partialeq("bkey")
diff --git a/bch_bindgen/src/bkey.rs b/bch_bindgen/src/bkey.rs
index 0c4786eb..1c98b029 100644
--- a/bch_bindgen/src/bkey.rs
+++ b/bch_bindgen/src/bkey.rs
@@ -51,6 +51,7 @@ pub enum BkeyValC<'a> {
logged_op_finsert(&'a c::bch_logged_op_finsert),
accounting(&'a c::bch_accounting),
inode_alloc_cursor(&'a c::bch_inode_alloc_cursor),
+ extent_whiteout,
}
impl<'a, 'b> BkeySC<'a> {
@@ -109,6 +110,7 @@ impl<'a, 'b> BkeySC<'a> {
KEY_TYPE_logged_op_finsert => logged_op_finsert(transmute(self.v)),
KEY_TYPE_accounting => accounting(transmute(self.v)),
KEY_TYPE_inode_alloc_cursor => inode_alloc_cursor(transmute(self.v)),
+ KEY_TYPE_extent_whiteout => extent_whiteout,
KEY_TYPE_MAX => unreachable!(),
}
}
diff --git a/bch_bindgen/src/libbcachefs_wrapper.h b/bch_bindgen/src/libbcachefs_wrapper.h
index 128592c3..be9656f9 100644
--- a/bch_bindgen/src/libbcachefs_wrapper.h
+++ b/bch_bindgen/src/libbcachefs_wrapper.h
@@ -13,6 +13,7 @@
#include "include/linux/blkdev.h"
#include "cmds.h"
#include "raid/raid.h"
+#include "src/rust_to_c.h"
/* Fix753 is a workaround for https://github.com/rust-lang/rust-bindgen/issues/753
* Functional macro are not expanded with bindgen, e.g. ioctl are automatically ignored