[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 0/3] Cleanups for ovirt 4.4

By the way if you happen to be looking at the Python plugin, then
there are two changes that may be worth using.



and multi-thread support:


These were both added (by you) and are both available in nbdkit >= 1.22,
which is now available in RHEL AV >= 8.3.0 so there's no reason why we
can't use them now.

I don't think there's any advantage to API_VERSION = 2 because the
plugin is very (exclusively?) write-heavy.  But a more parallel thread
model is surely advantageous?

For API_VERSION = 2, the changes are:

* pread signature changes to:

  def pread(h, buf, offset, flags) -> returns nothing

  - You have to write the result directly into the buf parameter,
    avoiding the extra copy.

* pwrite adds flags parameter:

  def pwrite(h, buf, offset, flags) -> returns nothing

* flush, trim also add flags parameter.

* zero changes signature completely, removing the may_trim parameter
  and adding a general flags parameter in its place.

For threads:

* Add a thread_model() function with no parameters which returns
  Of course locking will need to be introduced (especially for
  PARALLEL) to protect internal data structures.  See nbdkit-plugin(3)
  for an explanation of the thread models.

You'll also have to change the minimum version of nbdkit so that older
versions get rejected, here:



Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]