search for: nbdkit_reply_

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

Did you mean: nbdkit_reply
2017 Feb 19
2
Fwd: nbdkit async
...equest handle value 3) nbdkit bundles the nbd request handle value, bool flush_on_update, and read size into an opaque ptr to struct 4) nbdkit calls my_plugin.pread passing in the usual args + the opaque ptr 5) my_plugin.pread makes an asynchronous read call with a handler set on completion to call nbdkit_reply_read(conn, opaque ptr, buf) or on error nbdkit_reply_error(conn, opaque_ptr, error) 6) my_plugin.pread returns back to nbdkit without error after it has started the async op but before it has completed 7) nbdkit doesn't send a response to the conn->sockout beause when the async op has comple...
2017 Feb 20
0
Re: Fwd: nbdkit async
...to struct > 4) nbdkit calls my_plugin.pread passing in the usual args + the opaque ptr We can't change the existing API, so this would have to be exposed through new plugin entry point(s). > 5) my_plugin.pread makes an asynchronous read call with a handler set on > completion to call nbdkit_reply_read(conn, opaque ptr, buf) or on error > nbdkit_reply_error(conn, opaque_ptr, error) > 6) my_plugin.pread returns back to nbdkit without error after it has > started the async op but before it has completed > 7) nbdkit doesn't send a response to the conn->sockout beause when the...
2017 Feb 20
1
Re: Fwd: nbdkit async
...se if (op->cmd == NBD_CMD_READ) send_reply(op, op->buf, op->count, 0); else send_reply(op, NULL, 0, 0); } int my_plugin_pwrite_lowlevel (void *op, void *handle, void *buf, uint32_t count, uint64_t offset) { if (is_readonly(handle)) { nbdkit_reply_error (op, EROFS); return 0; } if (some critically bad issue) return -1; // this returns right away before write has completed and when it // does complete calls the handler lambda my_storage.async_write(buf, count, offset, [op, count](const boost::asio::error_code &am...