Displaying 8 results from an estimated 8 matches for "data_pread".
Did you mean:
data_area
2019 Apr 23
0
[nbdkit PATCH 4/4] plugins: Utilize ACQUIRE_LOCK_FOR_CURRENT_SCOPE
...2ce..77cae14 100644
--- a/plugins/data/data.c
+++ b/plugins/data/data.c
@@ -46,6 +46,7 @@
#include <nbdkit-plugin.h>
+#include "cleanup.h"
#include "sparse.h"
/* If raw|base64|data parameter seen. */
@@ -339,9 +340,8 @@ data_can_multi_conn (void *handle)
static int
data_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
{
- pthread_mutex_lock (&lock);
+ ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
sparse_array_read (sa, buf, count, offset);
- pthread_mutex_unlock (&lock);
return 0;
}
@@ -349,21 +349,16 @@ data_pread (void *handle, void *...
2019 Jan 05
15
[PATCH nbdkit v2 01/11] server: Implement NBD_FLAG_CAN_MULTI_CONN.
For existing commits, this is almost identical to v1, except that I
updated some commit messages and reordered the commits in a somewhat
more logical sequence.
The main changes are the extra commits:
[06/11] plugins: Return NBD_FLAG_CAN_MULTI_CONN from some readonly plugins.
- Readonly plugins that can set the flag unconditionally.
[09/11] partitioning: Return NBD_FLAG_CAN_MULTI_CONN.
[10/11]
2020 Feb 10
2
[nbdkit PATCH 04/10] plugins: Wire up in-memory plugin support for NBD_INFO_INIT_STATE
...IRE_LOCK_FOR_CURRENT_SCOPE (&lock);
+ return sparse_array_is_sparse (sa);
+}
+
+/* Does current client start with all zeroes. */
+static int
+data_init_zero (void *handle)
+{
+ ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
+ return sparse_array_is_zero (sa);
+}
+
/* Read data. */
static int
data_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
@@ -455,6 +472,8 @@ static struct nbdkit_plugin plugin = {
.can_fua = data_can_fua,
.can_cache = data_can_cache,
.can_fast_zero = data_can_fast_zero,
+ .init_sparse = data_init_sparse,
+ .init_zero...
2019 Aug 23
2
[nbdkit PATCH 3/3] plugins: Add .can_fast_zero hook
.../data/data.c
index 14fb8997..9004a487 100644
--- a/plugins/data/data.c
+++ b/plugins/data/data.c
@@ -349,6 +349,13 @@ data_can_cache (void *handle)
return NBDKIT_CACHE_NATIVE;
}
+/* Fast zero. */
+static int
+data_can_fast_zero (void *handle)
+{
+ return 1;
+}
+
/* Read data. */
static int
data_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
@@ -375,8 +382,10 @@ data_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset,
static int
data_zero (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
{
- /* Flushing, and thus FUA flag, is a no-op */
-...
2019 Apr 23
8
[nbdkit PATCH 0/4] Start using cleanup macros in filters/plugins
There's more that can be done (in particular, use of CLEANUP_FREE),
but this is enough to at least see if I'm on the right track.
I couldn't figure out an obvious difference between common/include and
common/utils, but it looks like the former is for things that are
inlineable via .h only, while the latter is when you need to link in
a convenience library, so this landed in the
2020 Feb 10
17
Cross-project NBD extension proposal: NBD_INFO_INIT_STATE
I will be following up to this email with four separate threads each
addressed to the appropriate single list, with proposed changes to:
- the NBD protocol
- qemu: both server and client
- libnbd: client
- nbdkit: server
The feature in question adds a new optional NBD_INFO_ packet to the
NBD_OPT_GO portion of handshake, adding up to 16 bits of information
that the server can advertise to the
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1:
- rework .can_cache to be tri-state, with default of no advertisement
(ripple effect through other patches)
- add a lot more patches in order to round out filter support
And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so
in theory we now have a way to test cache commands through the entire
stack.
Eric Blake (24):
server: Internal hooks for implementing
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