[PATCH nbdkit 0/3] server: Implement TCP fastopen (TFO)
by Richard W.M. Jones
TCP fastopen is a little-known feature for omitting part of the normal
3-way handshake. It's implemented in Linux (since ~2014), Windows
(since 2016), macOS and FreeBSD, but this implementation probably only
works on Linux. The heavy lifting is done by the kernel, and the
userspace changes needed (on Linux, at least) are very minor.
I'm mainly posting this to save the patch series. After going down a
rabbit hole testing and benchmarking this, it seems to make no
discernable difference that I can see, or any benefit must be under
the margin of error from measurement.
It's probably safe to include this feature, but on the other hand if
it doesn't do anything it seems to just add unnecessary complexity.
There is a corresponding libnbd series which also contains the
benchmark program, which I'll post in a moment.
Rich.
2 months
Note that guestfs now requires json-c (JSON library) instead of Jansson
by Richard W.M. Jones
Libvirt recently moved from yajl (another JSON library) to json-c,
because yajl is dead upstream.
So that we are using just one JSON library (eg. in Linux distros), I
also moved libguestfs, guestfs-tools and virt-v2v over to using
json-c. This change takes effect in:
- libguestfs >= 1.55.1 (development branch)
- guestfs-tools >= 1.53.4 (development branch)
- virt-v2v >= 2.7.1 (development branch)
(Previous versions like the just released stable libguestfs 1.54.x and
virt-v2v 2.6.x branches are NOT changed, and will still require Jansson).
That's the easy bit.
The _complicated_ bit is what happens if you mix up old libguestfs
with new guestfs-tools or virt-v2v (probably the other way round too,
but I didn't test that). It depends if you're using Jansson >= 2.14
or older Jansson. If using Jansson >= 2.14, you can freely mix
old/new packages. (The reason is to do with symbol versioning
introduced in Jansson 2.14).
If using Jansson < 2.14 then you'll hit this error caused by a
conflicting symbol across the Jansson and json-c libraries:
qemu-img info: JSON output did not contain ‘format’ key
If you see that error happening it's because you're mixing old and new
libguestfs, guestfs-tools, virt-v2v, AND using Jansson < 2.14. The
solution is not to mix them, or if you can't do that, update to the
latest Jansson and recompile everything.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
2 months
[PATCH libguestfs] appliance: Use stable owner, group and mtime in appliance tarballs
by Richard W.M. Jones
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2320025
Signed-off-by: Richard W.M. Jones <rjones(a)redhat.com>
---
appliance/Makefile.am | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/appliance/Makefile.am b/appliance/Makefile.am
index 8cb9bd1fff..51d9498e12 100644
--- a/appliance/Makefile.am
+++ b/appliance/Makefile.am
@@ -113,12 +113,17 @@ packagelist: packagelist.in Makefile guestfsd.deps
cmp -s $@ $@-t || mv $@-t $@
rm -f $@-t
+# Use stable times and owner/group (RHBZ#2320025).
+TAR_COMMAND := tar -z \
+ --owner=0 --group=0 \
+ $${SOURCE_DATE_EPOCH:+--mtime=@$$SOURCE_DATE_EPOCH}
+
supermin.d/daemon.tar.gz: ../daemon/guestfsd
rm -f $@ $@-t
rm -rf tmp-d
mkdir -p tmp-d$(DAEMON_SUPERMIN_DIR) tmp-d/etc
ln ../daemon/guestfsd tmp-d$(DAEMON_SUPERMIN_DIR)/guestfsd
- ( cd tmp-d && tar zcf - * ) > $@-t
+ ( cd tmp-d && $(TAR_COMMAND) -cf - * ) > $@-t
rm -r tmp-d
mv $@-t $@
@@ -139,7 +144,7 @@ supermin.d/hostfiles: hostfiles.in Makefile
supermin.d/init.tar.gz: init
rm -f $@ $@-t
- ( cd $(srcdir) && tar zcf - init ) > $@-t
+ ( cd $(srcdir) && $(TAR_COMMAND) -cf - init ) > $@-t
mv $@-t $@
# We should put this file in /lib/udev/rules.d, but put it in /etc so
@@ -149,7 +154,7 @@ supermin.d/udev-rules.tar.gz: 99-guestfs-serial.rules
rm -rf tmp-u
mkdir -p tmp-u/etc/udev/rules.d
for f in $^; do ln $$f tmp-u/etc/udev/rules.d/$$(basename $$f); done
- ( cd tmp-u && tar zcf - etc ) > $@-t
+ ( cd tmp-u && $(TAR_COMMAND) -cf - etc ) > $@-t
rm -r tmp-u
mv $@-t $@
--
2.46.0
2 months