Allows us to drop the ‘open’ callback from the minimal plugin.
<li> <code>get_size</code>
<li> <code>pread</code>
<li> <code>pwrite</code>
+<li> <code>trim</code>
+<li> <code>zero</code>
</ul>
<p>
-Almost all callbacks are optional.
+Only <code>get_size</code> and <code>pread</code> are
+mandatory for shell script plugins.
</p>
<h2>Get it</h2>
<ul>
-<li> nbdkit 1.8 now available in all major Linux distros.
+<li> nbdkit ≥ 1.8.1 now available in all major Linux distros.
<li> nbd client ≥ 3.18 and kernel ≥ 4.18 recommended.
<li> <a href="https://github.com/libguestfs/nbdkit">https://github.com/libguestfs/nbdkit</a>
<li> This talk: <a href="http://git.annexia.org/?p=libguestfs-talks.git">http://git.annexia.org/?p=libguestfs-talks.git</a>
#!/bin/bash
case "$1" in
- open) ;;
get_size) echo 64M ;;
pread)
if [ $4 -le 100000 ] && [ $(( $4+$3 )) -gt 100000 ]; then