search for: cb0e170

Displaying 3 results from an estimated 3 matches for "cb0e170".

2019 Jun 18
0
[libnbd PATCH 4/8] states: Prepare for read callback
...if (cmd->cb.fn.extent (cmd->cb.opaque, meta_context->name, cmd->offset, + &h->bs_entries[1], (length-4) / 4) == -1) cmd->error = errno ? errno : EPROTO; } else diff --git a/lib/internal.h b/lib/internal.h index 1f8f789..cb0e170 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -231,7 +231,16 @@ struct socket { const struct socket_ops *ops; }; -typedef int (*extent_fn) (void *data, const char *metacontext, uint64_t offset, uint32_t *entries, size_t nr_entries); +typedef int (*extent_fn) (void *data, const char *meta...
2019 Jun 18
0
[libnbd PATCH 5/8] states: Wire in a read callback
...t;cb.opaque, cmd->data + offset, length, + cmd->offset + offset, LIBNBD_READ_HOLE) == -1) + if (cmd->error == 0) + cmd->error = errno ? errno : EPROTO; + } SET_NEXT_STATE(%FINISH); } diff --git a/lib/internal.h b/lib/internal.h index cb0e170..a1e27df 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -233,12 +233,14 @@ struct socket { typedef int (*extent_fn) (void *data, const char *metacontext, uint64_t offset, uint32_t *entries, size_t nr_entries); +typedef int (*read_fn) (void *data, const void *buf, s...
2019 Jun 18
17
[libnbd PATCH 0/8] Add nbd_pread_callback
I've mentioned this topic before (in fact, the idea of adding NBD_CMD_FLAG_DF was first mentioned at [1]), but finally finished enough of an implementation to feel confident in posting it. I'd still like to add something under examples/ that uses the new API to implement strict checking of a server's structured replies read implementation (ensure that a server never sends data after