search for: nozero_can_zero

Displaying 6 results from an estimated 6 matches for "nozero_can_zero".

2019 May 10
1
[nbdkit PATCH] nozero: Add notrim mode
...== NOTRIM) { + r = next_ops->can_zero (nxdata); + if (r == -1) + return -1; + if (!r) { + nbdkit_error ("zeromode 'notrim' requires plugin zero support"); + return -1; + } + } + return 0; +} /* Advertise desired WRITE_ZEROES mode. */ static int nozero_can_zero (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) { - return emulate; + return zeromode != NONE; } static int @@ -81,11 +105,15 @@ nozero_zero (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, uint32_t count, uint64_t offs, uint32_t flags,...
2018 Jan 24
0
[nbdkit PATCH 3/3] filters: Add nozero filter
...ITY OF + * SUCH DAMAGE. + */ + +#include <config.h> + +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> +#include <string.h> + +#include <nbdkit-filter.h> + +#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL + +/* Disable WRITE_ZEROES. */ +static int +nozero_can_zero (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + return 0; +} + +/* Should never be reached (nbdkit should have already flagged a bad client). */ +static int +nozero_zero (struct nbdkit_next_ops *next_ops, void *nxdata, + void *handle, uint32_t count, uint64_t offs,...
2018 Jan 24
8
[nbdkit PATCH 0/3] Add nozero filter
I still need to add testsuite coverage. Perhaps it might be easier if I create a new '--filter=log logfile=foo' filter that produces a log of which commands a client sent, then compare the log using a known client that uses write_zeroes (qemu-io works well) both with and without --filter=nozero to prove that the change in advertisement changes the commands sent over the wire (that would
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]
2019 Aug 30
15
[nbdkit PATCH 0/9] can_FOO caching, more filter validation
It's easy to use the sh script to demonstrate that nbdkit is inefficiently calling into .get_size, .can_fua, and friends more than necessary. We've also commented on the list in the past that it would be nice to ensure that when filters call into next_ops, they are not violating constraints (as we've have to fix several bugs in the past where we did not have such checking to protect