Displaying 2 results from an estimated 2 matches for "invalid_range".
Did you mean:
invalid_page
2019 Aug 30
0
[nbdkit PATCH 9/9] server: Move command validation from protocol.c to backend.c
...cmd);
+ return true;
+ }
+ if (flags & NBDKIT_FLAG_FUA) {
+ assert (h->can_fua >= 0);
+ if (h->can_fua == 0) {
+ nbdkit_error ("invalid request: %s: FUA flag not supported", cmd);
+ return true;
+ }
+ }
+ return false;
+}
+
+static bool
+invalid_range (struct backend *b, struct connection *conn, const char *cmd,
+ uint64_t offset, uint32_t count)
+{
+ struct b_conn_handle *h = &conn->handles[b->i];
+
+ assert (h->exportsize >= 0);
+ if (!count || offset > h->exportsize || offset + count > h->exportsiz...
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