Displaying 7 results from an estimated 7 matches for "pattern_pread".
2019 Jan 05
0
[PATCH nbdkit v2 06/11] plugins: Return NBD_FLAG_CAN_MULTI_CONN from some readonly plugins.
...00644
--- a/plugins/pattern/pattern.c
+++ b/plugins/pattern/pattern.c
@@ -88,6 +88,13 @@ pattern_get_size (void *handle)
return size;
}
+/* Serves the same data over multiple connections. */
+static int
+pattern_can_multi_conn (void *handle)
+{
+ return 1;
+}
+
/* Read data. */
static int
pattern_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
@@ -118,6 +125,7 @@ static struct nbdkit_plugin plugin = {
.config_help = pattern_config_help,
.open = pattern_open,
.get_size = pattern_get_size,
+ .can_multi_conn = pattern_can_multi_conn,
.prea...
2019 Jan 04
0
[PATCH nbdkit] common/include: Add generic MIN and MAX macros.
...ing.h"
+#include "minmax.h"
/* The size of disk in bytes (initialized by size=<SIZE> parameter). */
static int64_t size = 0;
@@ -87,8 +88,6 @@ pattern_get_size (void *handle)
return size;
}
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
/* Read data. */
static int
pattern_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
diff --git a/common/include/Makefile.am b/common/include/Makefile.am
index 3e7f056..7df4855 100644
--- a/common/include/Makefile.am
+++ b/common/include/Makefile.am
@@ -41,6 +41,7 @@ EXTRA_DIST = \
isaligned.h \
ispowerof2.h \
iszero....
2019 Jan 04
0
[PATCH nbdkit v5 2/3] common/include: Add generic MIN and MAX macros.
...ing.h"
+#include "minmax.h"
/* The size of disk in bytes (initialized by size=<SIZE> parameter). */
static int64_t size = 0;
@@ -87,8 +88,6 @@ pattern_get_size (void *handle)
return size;
}
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
/* Read data. */
static int
pattern_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
diff --git a/common/include/Makefile.am b/common/include/Makefile.am
index 3e7f056..7df4855 100644
--- a/common/include/Makefile.am
+++ b/common/include/Makefile.am
@@ -41,6 +41,7 @@ EXTRA_DIST = \
isaligned.h \
ispowerof2.h \
iszero....
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 May 10
11
[nbdkit PATCH 0/9] RFC: implement NBD_CMD_CACHE
I'm still working my way through the filters before this series will
be complete, but this is enough of a start to at least get some
feedback on the idea of implementing another NBD protocol extension.
Eric Blake (9):
server: Internal hooks for implementing NBD_CMD_CACHE
plugins: Add .cache callback
file, split: Implement .cache with posix_fadvise
nbd: Implement NBD_CMD_CACHE
2019 Jan 04
5
[PATCH nbdkit v5 3/3] cache: Implement cache-max-size and cache space reclaim.
v4:
https://www.redhat.com/archives/libguestfs/2019-January/msg00032.html
v5:
- Now we set the block size at run time.
I'd like to say that I was able to test this change, but
unfortunately I couldn't find any easy way to create a filesystem
on x86-64 with a block size > 4K. Ext4 doesn't support it at all,
and XFS doesn't support block size > page size (and I
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