Displaying 2 results from an estimated 2 matches for "2804cba".
2018 Jan 24
0
[nbdkit PATCH 2/3] filter: Add .can_zero/.can_fua overrides
...can_zero && cmd == NBD_CMD_WRITE_ZEROES) {
+ nbdkit_error ("invalid request: write zeroes operation not supported");
+ *error = EINVAL;
+ return false;
+ }
+
return true; /* Command validates. */
}
diff --git a/src/filters.c b/src/filters.c
index 2804cba..87c6e97 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -297,6 +297,20 @@ next_can_trim (void *nxdata)
return b_conn->b->can_trim (b_conn->b, b_conn->conn);
}
+static int
+next_can_zero (void *nxdata)
+{
+ struct b_conn *b_conn = nxdata;
+ return b_conn->b->can_zero (b_c...
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