Displaying 7 results from an estimated 7 matches for "iso_pread".
Did you mean:
aio_pread
2019 Jan 05
0
[PATCH nbdkit v2 06/11] plugins: Return NBD_FLAG_CAN_MULTI_CONN from some readonly plugins.
...44
--- a/plugins/iso/iso.c
+++ b/plugins/iso/iso.c
@@ -258,6 +258,13 @@ iso_get_size (void *handle)
return statbuf.st_size;
}
+/* Serves the same data over multiple connections. */
+static int
+iso_can_multi_conn (void *handle)
+{
+ return 1;
+}
+
/* Read data from the file. */
static int
iso_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
@@ -291,6 +298,7 @@ static struct nbdkit_plugin plugin = {
.magic_config_key = "dir",
.open = iso_open,
.get_size = iso_get_size,
+ .can_multi_conn = iso_can_multi_conn,
.pread =...
2020 Apr 09
0
[PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...iso_can_multi_conn (void *handle)
@@ -219,35 +239,6 @@ iso_can_multi_conn (void *handle)
return 1;
}
-static int
-iso_can_cache (void *handle)
-{
- /* Let nbdkit call pread to populate the file system cache. */
- return NBDKIT_CACHE_EMULATE;
-}
-
-/* Read data from the file. */
-static int
-iso_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
-{
- while (count > 0) {
- ssize_t r = pread (fd, buf, count, offset);
- if (r == -1) {
- nbdkit_error ("pread: %m");
- return -1;
- }
- if (r == 0) {
- nbdkit_error ("pread: unexpected end of f...
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]
2019 Aug 02
0
[nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...fork() */
};
NBDKIT_REGISTER_PLUGIN(plugin)
diff --git a/plugins/iso/iso.c b/plugins/iso/iso.c
index 5634bac9..bb942f85 100644
--- a/plugins/iso/iso.c
+++ b/plugins/iso/iso.c
@@ -260,6 +260,7 @@ static struct nbdkit_plugin plugin = {
.can_cache = iso_can_cache,
.pread = iso_pread,
.errno_is_preserved = 1,
+ .fork_safe = 1, /* no fork()s after .config_complete */
};
NBDKIT_REGISTER_PLUGIN(plugin)
diff --git a/plugins/libvirt/libvirt-plugin.c b/plugins/libvirt/libvirt-plugin.c
index 71cac42b..cd4e326c 100644
--- a/plugins/libvirt/libvirt-plugin.c
+++ b/plugins/...
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message
for patch 3.
Rich.
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 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):