Displaying 8 results from an estimated 8 matches for "cow_prepar".
Did you mean:
cow_prepare
2019 Mar 26
0
[PATCH nbdkit v4 05/15] cow: Disable extents information in this filter.
...because xz files contain
sparseness information, so add a note.
---
filters/cow/cow.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/filters/cow/cow.c b/filters/cow/cow.c
index b8f08c4..570a65f 100644
--- a/filters/cow/cow.c
+++ b/filters/cow/cow.c
@@ -114,7 +114,7 @@ cow_prepare (struct nbdkit_next_ops *next_ops, void *nxdata,
}
/* Whatever the underlying plugin can or can't do, we can write, we
- * cannot trim, and we can flush.
+ * cannot trim or detect extents, and we can flush.
*/
static int
cow_can_write (struct nbdkit_next_ops *next_ops, void *nxdata, vo...
2018 Jan 20
0
[PATCH nbdkit] filters: Add copy-on-write filter.
...(size == -1)
+ return -1;
+
+ if (ftruncate (fd, size) == -1)
+ return -1;
+
+ nbdkit_debug ("cow: underlying file size: %" PRIi64, size);
+
+ return size;
+}
+
+/* Force an early call to cow_get_size, consequently truncating the
+ * overlay to the correct size.
+ */
+static int
+cow_prepare (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle)
+{
+ int64_t r;
+
+ r = cow_get_size (next_ops, nxdata, handle);
+ return r >= 0 ? 0 : -1;
+}
+
+/* Whatever the underlying plugin can or can't do, we can write, we
+ * cannot trim, and we can flush.
+ */
+stati...
2018 Jan 20
4
[PATCH nbdkit] filters: Add copy-on-write filter.
Eric, you'll probably find the design "interesting" ...
It does work, for me at least.
Rich.
2019 Aug 30
0
[nbdkit PATCH 6/9] server: Cache per-connection can_FOO flags
...7,7 @@ cow_get_size (struct nbdkit_next_ops *next_ops, void *nxdata,
return size;
}
-/* Force an early call to cow_get_size, consequently truncating the
+/* Force early calls to populate nbdkit's cache, and truncate the
* overlay to the correct size.
*/
static int
@@ -137,7 +137,14 @@ cow_prepare (struct nbdkit_next_ops *next_ops, void *nxdata,
int64_t r;
r = cow_get_size (next_ops, nxdata, handle);
- return r >= 0 ? 0 : -1;
+ if (r == -1)
+ return -1;
+
+ r = next_ops->can_cache (nxdata);
+ if (r == -1)
+ return -1;
+
+ return 0;
}
/* Whatever the underlying plu...
2019 Mar 26
21
[PATCH nbdkit v4 00/15] Implement Block Status.
I'm not sure exactly which version we're up to, but let's say it's
version 4.
I'm a lot happier with this version:
- all filters have been reviewed and changed where I think that's necessary
- can_extents is properly defined and implemented now
- NBD protocol is followed
- I believe it addresses all previous review points where possible
The "only" thing
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 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here
so we have a reference in the mailing list in case we find bugs later
(as I'm sure we will - it's a complex patch series).
Great thanks to Eric Blake for tireless review on this one. It also
seems to have identified a few minor bugs in qemu along the way.
Rich.
2019 Aug 30
15
[nbdkit PATCH 0/9] can_FOO caching, more filter validation
It's easy to use the sh script to demonstrate that nbdkit is
inefficiently calling into .get_size, .can_fua, and friends more than
necessary. We've also commented on the list in the past that it would
be nice to ensure that when filters call into next_ops, they are not
violating constraints (as we've have to fix several bugs in the past
where we did not have such checking to protect