X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=2019-kvm-forum%2F2700-nbdkit-sh-for-testing.html;h=7b1826d4e36d55208e3dda44491bc93d60eccf6c;hb=6f34bcd5178f2622d9a15915ad2ca136525f318a;hp=36e77dc8653425ac669e68c88545d4a7fe5187e7;hpb=5909a3851fd6adb906f40d5839d8acf4e1e7e323;p=libguestfs-talks.git diff --git a/2019-kvm-forum/2700-nbdkit-sh-for-testing.html b/2019-kvm-forum/2700-nbdkit-sh-for-testing.html index 36e77dc..7b1826d 100644 --- a/2019-kvm-forum/2700-nbdkit-sh-for-testing.html +++ b/2019-kvm-forum/2700-nbdkit-sh-for-testing.html @@ -4,15 +4,16 @@

nbdkit sh plugin for testing

- - -
+
+
+
+
+
+
+
+
+
 #!/bin/bash
 
 case "$1" in
     get_size) echo 64M ;;
     pread)
-        if [ $4 -le 100000 ] && [ $(( $4+$3 )) -gt 100000 ]; then
+        if [ $4 -le 100000 ] &&
+           [ $(( $4+$3 )) -gt 100000 ]; then
             echo EIO Bad block >&2
             exit 1
         else
@@ -21,3 +22,17 @@
     *) exit 2 ;;
 esac
 
+
+ + +
+On Youtube: +Better loop mounts with NBD — +Take your loop mounts to the next level with nbdkit +