Displaying 7 results from an estimated 7 matches for "_trim_old".
2018 Mar 08
0
[nbdkit PATCH v3 11/15] plugins: Expose new FUA callbacks
...(void *handle, uint32_t count, uint64_t offset);
int (*zero) (void *handle, uint32_t count, uint64_t offset, int may_trim);
+#else
+ int (*_pread_old) (void *, void *, uint32_t, uint64_t);
+ int (*_pwrite_old) (void *, const void *, uint32_t, uint64_t);
+ int (*_flush_old) (void *);
+ int (*_trim_old) (void *, uint32_t, uint64_t);
+ int (*_zero_old) (void *, uint32_t, uint64_t, int);
+#endif
int errno_is_preserved;
void (*dump_plugin) (void);
+ int (*can_fua) (void *handle);
+#if NBDKIT_API_VERSION == 1
+ int (*_unused1) (void *, void *, uint32_t, uint64_t);
+ int (*_unused2) (void...
2019 Feb 08
0
[PATCH nbdkit] Add support for writing plugins in Rust.
...on<extern fn (*mut c_void) -> c_int>,
+ pub can_trim: Option<extern fn (*mut c_void) -> c_int>,
+
+ // Slots for old v1 API functions.
+ _pread_old: Option<extern fn ()>,
+ _pwrite_old: Option<extern fn ()>,
+ _flush_old: Option<extern fn ()>,
+ _trim_old: Option<extern fn ()>,
+ _zero_old: Option<extern fn ()>,
+
+ errno_is_preserved: c_int,
+
+ pub dump_plugin: Option<extern fn ()>,
+
+ pub can_zero: Option<extern fn (*mut c_void) -> c_int>,
+ pub can_fua: Option<extern fn (*mut c_void) -> c_int>,...
2019 Oct 04
6
[nbdkit PATCH 0/5] Another round of retry fixes
I still don't have .prepare/.finalize working cleanly across reopen,
but did find a nasty bug where a botched assertion means we failed to
notice reads beyond EOF in both the xz and retry filter.
Refactoring backend.c will make .finalize work easier.
Eric Blake (5):
xz: Avoid reading beyond EOF
retry: Check size before transactions
tests: Test retry when get_size values change
2018 Mar 08
0
[nbdkit PATCH v3 15/15] RFC: plugins: Add back-compat for new plugin with old nbdkit
...\
+ return (plugin).flush (handle, 0); \
+ } \
+ static int \
+ nbdkit_trim_old (void *handle, uint32_t count, uint64_t offset) \
+ { \
+ return (plugin).trim (handle, count, offset, 0); \
+ } \
+ static int...
2019 Feb 08
3
[PATCH nbdkit] Add support for writing plugins in Rust.
This adds very rough support for writing nbdkit plugins in Rust. This
is not very idiomatic -- essentially we're handling the direct C calls
from nbdkit in Rust. We have to use ‘unsafe’ in a few places because
there's no way to tell the Rust code that nbdkit satisfies guarantees
(eg. around thread safety, always returning leaked pointers back to
the close function, always doing bounds
2018 Mar 22
1
[nbdkit PATCH] plugins: Add .can_zero callback
...int (*_unused1) (void *, void *, uint32_t, uint64_t);
diff --git a/src/plugins.c b/src/plugins.c
index d44e724..ff4facf 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -355,25 +355,24 @@ plugin_can_trim (struct backend *b, struct connection *conn)
return p->plugin.trim || p->plugin._trim_old;
}
-/* Grab the appropriate error value.
- */
-static int
-get_error (struct backend_plugin *p)
-{
- int ret = threadlocal_get_error ();
-
- if (!ret && p->plugin.errno_is_preserved)
- ret = errno;
- return ret ? ret : EIO;
-}
-
static int
plugin_can_zero (struct backend *b, st...
2018 Mar 08
19
[nbdkit PATCH v3 00/15] Add FUA support to nbdkit
After more than a month since v2 [1], I've finally got my FUA
support series polished. This is all of my outstanding patches,
even though some of them were originally posted in separate
threads from the original FUA post [2], [3]
[1] https://www.redhat.com/archives/libguestfs/2018-January/msg00113.html
[2] https://www.redhat.com/archives/libguestfs/2018-January/msg00219.html
[3]