Displaying 10 results from an estimated 10 matches for "delay_pread".
2018 Jan 19
0
[PATCH nbdkit filters-v2 5/5] INCOMPLETE filters: Add nbdkit-partition-filter.
...= \
delay \
- offset
+ offset \
+ partition
diff --git a/filters/delay/delay.c b/filters/delay/delay.c
index c8d9ef2..66b7e56 100644
--- a/filters/delay/delay.c
+++ b/filters/delay/delay.c
@@ -121,30 +121,30 @@ delay_config (nbdkit_next_config *next, void *nxdata,
/* Read data. */
static int
-delay_pread (struct nbdkit_next *next, void *nxdata,
+delay_pread (struct nbdkit_next_ops *next_ops, void *nxdata,
void *handle, void *buf, uint32_t count, uint64_t offset)
{
read_delay ();
- return next->pread (nxdata, buf, count, offset);
+ return next_ops->pread (nxdata, buf, count...
2018 Jan 17
0
[PATCH 9/9] filters: Move rdelay/wdelay from file plugin to new delay filter.
...}
+ else
+ return next (nxdata, key, value);
+}
+
+#define delay_config_help \
+ "rdelay=<NN>[ms] Read delay in seconds/milliseconds.\n" \
+ "wdelay=<NN>[ms] Write delay in seconds/milliseconds." \
+
+/* Read data. */
+static int
+delay_pread (struct nbdkit_next *next, void *nxdata,
+ void *handle, void *buf, uint32_t count, uint64_t offset)
+{
+ read_delay ();
+ return next->pread (nxdata, buf, count, offset);
+}
+
+/* Write data. */
+static int
+delay_pwrite (struct nbdkit_next *next, void *nxdata,
+ void...
2018 Jan 14
10
[PATCH nbdkit INCOMPLETE 0/6] Introduce filters to nbdkit.
...* Implement "copy-on-write" (a feature found in other NBD servers).
Filters are implemented by allowing them to intercept methods before a
plugin gets them. For example to implement a read delay the filter
would register for a .pread hook which is implemented like this:
static int
delay_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
int (*next) (void *data,
void *buf, uint32_t count, uint64_t offset),
void *data)
{
nanosleep (...);
return next (data, buf, count, offset); // calls next filter or plugin...
2018 Jan 19
10
[PATCH nbdkit filters-v2 0/5] Introduce filters.
Rebased filters patch. Requires current git master + the locks /
thread model fix
(https://www.redhat.com/archives/libguestfs/2018-January/msg00128.html)
So a few changes here since last time:
The "introduce filters" and "implement filters" patches are
squashed together.
I introduced a concept of .prepare and .finalize. These run before
and after the data serving phase
2019 Aug 30
1
[nbdkit PATCH v2] filters: Stronger version match requirements
...void *nxdata,
static struct nbdkit_filter filter = {
.name = "delay",
.longname = "nbdkit delay filter",
- .version = PACKAGE_VERSION,
.config = delay_config,
.config_help = delay_config_help,
.pread = delay_pread,
diff --git a/filters/error/error.c b/filters/error/error.c
index 968f2837..2d39b251 100644
--- a/filters/error/error.c
+++ b/filters/error/error.c
@@ -375,7 +375,6 @@ error_cache (struct nbdkit_next_ops *next_ops, void *nxdata,
static struct nbdkit_filter filter = {
.name = "...
2018 Jan 19
9
[PATCH nbdkit filters-v3 0/7] Introduce filters.
This is still tentative and needs a lot of work, but:
- partition filter works, supporting MBR & GPT
- prepare and finalize methods fixed
- open method can now be changed (allowing readonly flag to be modified)
- thread_model can be limited
I believe I made most of the changes which were previously suggested
in email. I think the only one I didn't was preventing inclusion of
both
2018 Jan 17
14
[PATCH 0/9] Add filters to nbdkit.
The first three patches are identical to:
https://www.redhat.com/archives/libguestfs/2018-January/msg00079.html
"[PATCH nbdkit v2 0/3] Refactor plugin_* functions into a backend"
The rest of the patches add filters using the new filter API
previously described here:
https://www.redhat.com/archives/libguestfs/2018-January/msg00073.html
This needs a lot more testing -- and tests --
2018 Jan 19
16
[nbdkit PATCH v2 00/13] Add filters + FUA support to nbdkit
A combination of the work that both Rich and I have been doing
lately, where filters use only the new API with flags on every
command that the client can send over the wire (we can then
add support for more flags in nbdkit without having to add new
callbacks, as NBD adds more flags upstream).
Eric Blake (4):
protocol: Split flags from cmd field in requests
backend: Pass flags argument through
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem
to four different projects:
- nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag
- qemu: Implement the flag for both clients and server
- libnbd: Implement the flag for clients
- nbdkit: Implement the flag for servers, including the nbd passthrough
client
If you want to test the patches together, I've pushed a
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]