search for: _extents

Displaying 5 results from an estimated 5 matches for "_extents".

Did you mean: extents
2019 Aug 16
7
[nbdkit PATCH 0/2] rust: Implement some missing v2 callbacks
Similar to what I just did for OCaml (this IS an API break, requiring recompilation of any existing Rust plugin), and done because I want to add fast_zero support to both languages as part of my upcoming fast zero series. Figuring out how to get extents working was hard enough that I punted that, still. Eric Blake (2): rust: Implement can_cache rust: Add support for dynamic .thread_model
2019 Aug 16
0
[nbdkit PATCH 1/2] rust: Implement can_cache
...b/plugins/rust/nbdkit-rust-plugin.pod index db2a55ee..930829cc 100644 --- a/plugins/rust/nbdkit-rust-plugin.pod +++ b/plugins/rust/nbdkit-rust-plugin.pod @@ -90,6 +90,16 @@ thread models, see L<nbdkit-plugin(3)/THREADS>. =back +=head2 Missing callbacks + +=over 4 + +=item Missing: C<can_extents> and C<extents> + +These are not yet supported. + +=back + =head1 SEE ALSO L<nbdkit(1)>, diff --git a/plugins/rust/src/lib.rs b/plugins/rust/src/lib.rs index a3dbf43e..25af2fe6 100644 --- a/plugins/rust/src/lib.rs +++ b/plugins/rust/src/lib.rs @@ -93,6 +93,15 @@ pub struct Plugin...
2019 Aug 16
1
Re: [nbdkit PATCH 2/2] rust: Add support for dynamic .thread_model
...> - _thread_model: thread_model as c_int, > + _thread_model: ThreadModel::Parallel as c_int, > name: name, > longname: std::ptr::null(), > version: std::ptr::null(), > @@ -159,6 +162,7 @@ impl Plugin { > _extents: None, > can_cache: None, > cache: None, > + thread_model: None, Indentation? > } > } > } Anyway this looks fine to me. If it compiles and runs there's not much that can go wrong, so ACK. Rich. -- Richard Jones, Virtualizatio...
2019 Aug 16
2
Re: [nbdkit PATCH 1/2] rust: Implement can_cache
...b/plugins/rust/src/lib.rs > @@ -93,6 +93,15 @@ pub struct Plugin { > pub magic_config_key: *const c_char, > > pub can_multi_conn: Option<extern fn (h: *mut c_void) -> c_int>, > + > + // Slots for extents functions, which needs more integration. > + _can_extents: Option<extern fn ()>, > + _extents: Option<extern fn ()>, Here, I was just copying what we had already done for the v1 fields that should remain unused (see above, in _pread_old for example). But is there a saner way to write a Rust struct that reserves the space required by th...
2019 Aug 16
0
[nbdkit PATCH 2/2] rust: Add support for dynamic .thread_model
...u64, _api_version: 2, - _thread_model: thread_model as c_int, + _thread_model: ThreadModel::Parallel as c_int, name: name, longname: std::ptr::null(), version: std::ptr::null(), @@ -159,6 +162,7 @@ impl Plugin { _extents: None, can_cache: None, cache: None, + thread_model: None, } } } -- 2.20.1