Skip to contentSkip to conversation

examples: Small updates to nbd.fio

PATCH Applied Richard W.M. Jones 2 participants 2 messages Feb 13, 2023 – Feb 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples: Small updates to nbd.fio

Improve the documentation, describing how to use nbdkit with a local file. Move the suggested test file to /var/tmp since /tmp might be a tmpfs. Use indenting to make it easier to read.

Use ${uri} instead of ${unixsocket} since nbdkit 1.14 was released nearly 4 years ago.

---
 examples/nbd.fio | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)
examples/nbd.fio +16 -12
index 6900ebe7..31629fad 100644
@@ -1,21 +1,25 @@
-# To use fio to test nbdkit:
+# To use fio to test nbdkit + RAM disk:
 #
-# nbdkit -U - memory size=256M --run 'export unixsocket; fio examples/nbd.fio'
+#   nbdkit -U - memory size=256M --run 'export uri; fio examples/nbd.fio'
 #
-# To use fio to test qemu-nbd:
+# To use fio to test nbdkit + local file:
 #
-# rm -f /tmp/disk.img /tmp/socket
-# truncate -s 256M /tmp/disk.img
-# export unixsocket=/tmp/socket
-# qemu-nbd -t -k $unixsocket -f raw /tmp/disk.img &
-# fio examples/nbd.fio
-# killall qemu-nbd
+#   rm -f /var/tmp/disk.img
+#   truncate -s 256M /var/tmp/disk.img
+#   nbdkit -U - file /var/tmp/disk.img --run 'export uri; fio examples/nbd.fio'
+#
+# To use fio to test qemu-nbd + local file:
+#
+#   rm -f /var/tmp/disk.img /var/tmp/socket
+#   truncate -s 256M /var/tmp/disk.img
+#   export uri='nbd+unix:///?socket=/var/tmp/socket'
+#   qemu-nbd -t -k /var/tmp/socket -f raw /var/tmp/disk.img &
+#   fio examples/nbd.fio
+#   killall qemu-nbd
 
 [global]
 ioengine=nbd
-uri=nbd+unix:///?socket=${unixsocket}
-# Starting from nbdkit 1.14 the following will work:
-#uri=${uri}
+uri=${uri}
 rw=randrw
 time_based
 runtime=60
Signature · 1 line
2.39.0
Applied
#1 lore raw
Quoted 8 lines · Richard W.M. Jones

Improve the documentation, describing how to use nbdkit with a local file. Move the suggested test file to /var/tmp since /tmp might be a tmpfs. Use indenting to make it easier to read.

Use ${uri} instead of ${unixsocket} since nbdkit 1.14 was released nearly 4 years ago.

Applied. Thanks.