[Libguestfs] [PATCH nbdkit v3] New tmpdisk plugin.

Richard W.M. Jones rjones at redhat.com
Tue Mar 17 11:56:57 UTC 2020


v2 was here:
https://www.redhat.com/archives/libguestfs/2020-March/msg00154.html

v3:

- Micro-optimize tmpdir.

- Quote $disk in default command shell fragment.

- Don't redirect mkfs output to /dev/null.  Instead use
  exec </dev/null >/dev/null before the shell fragment.

  We may want to do this in other places where we run
  external shell scripts, or more generally for all
  plugins, but this commit does not fix this.

- Improve can_multi_conn comment.

- Use mkostemp if available.  If not we have to use a
  racy mkstemp + set_cloexec instead.

- I still didn't implement .zero, because the implementation
  (see plugins/file/file.c) is really complicated even if you
  remove the block device code.  I guess it would be nice to
  isolate all this complexity into common/ at some point, which
  would allow us to implement efficient zero (and trim) in other
  file-backed plugins.

- I left WIFSTOPPED, but I guess I could remove it.  Are we sure
  it can never happen (eg. if the user is running nbdkit in the
  foreground and uses ^Z)?

- Rerun the tests & valgrind.

Rich.





More information about the Libguestfs mailing list