Displaying 5 results from an estimated 5 matches for "reflection_get_size".
2019 Sep 28
0
[PATCH nbdkit v2 2/4] Rename nbdkit-reflection-plugin to nbdkit-info-plugin.
...;
@@ -286,7 +286,7 @@ reflection_open (int readonly)
/* Close the per-connection handle. */
static void
-reflection_close (void *handle)
+info_close (void *handle)
{
struct handle *h = handle;
@@ -298,7 +298,7 @@ reflection_close (void *handle)
/* Get the disk size. */
static int64_t
-reflection_get_size (void *handle)
+info_get_size (void *handle)
{
struct handle *h = handle;
@@ -306,7 +306,7 @@ reflection_get_size (void *handle)
}
static int
-reflection_can_multi_conn (void *handle)
+info_can_multi_conn (void *handle)
{
switch (mode) {
/* Safe for exportname modes since clients...
2019 Sep 15
0
Re: [PATCH nbdkit 0/4] Reflection plugin, peer name.
...safe to do.
Given this commit, I guess we should squash in the following to the
4th patch:
diff --git a/plugins/reflection/reflection.c b/plugins/reflection/reflection.c
index a0d7c60..f765557 100644
--- a/plugins/reflection/reflection.c
+++ b/plugins/reflection/reflection.c
@@ -303,11 +303,22 @@ reflection_get_size (void *handle)
return (int64_t) h->len;
}
-/* Read-only plugin so multi-conn is safe. */
static int
reflection_can_multi_conn (void *handle)
{
- return 1;
+ switch (mode) {
+ /* Safe for exportname modes since clients should only request
+ * multi-conn with the same export name...
2019 Sep 15
0
[PATCH nbdkit 1/4] Add reflection plugin.
...}
+
+ default:
+ abort ();
+ }
+}
+
+/* Close the per-connection handle. */
+static void
+reflection_close (void *handle)
+{
+ struct handle *h = handle;
+
+ free (h->data);
+ free (h);
+}
+
+#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL
+
+/* Get the disk size. */
+static int64_t
+reflection_get_size (void *handle)
+{
+ struct handle *h = handle;
+
+ return (int64_t) h->len;
+}
+
+/* Read-only plugin so multi-conn is safe. */
+static int
+reflection_can_multi_conn (void *handle)
+{
+ return 1;
+}
+
+/* Cache. */
+static int
+reflection_can_cache (void *handle)
+{
+ /* Everything is alrea...
2019 Sep 15
13
[PATCH nbdkit 0/4] Reflection plugin, peer name.
This series is based on my blog posting here:
https://rwmj.wordpress.com/2019/09/13/nbdkit-supports-exportnames/
It depends on the fix for realloc:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00103
This series adds a fun plugin, and also an semi-related feature I've
long thought to be desirable. You can consider patches 1 & 4, and
patches 2 & 3 as forming
2019 Sep 28
9
[PATCH nbdkit v2 0/4] info: Add mode for sending back server time.
v1 was:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00361
v2:
- Adds a patch to rename the reflection plugin to the info plugin.
- Adds tests.
Rich.