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

Re: [PATCH] proto: add xNBD command NBD_CMD_CACHE to the spec



I'm a bit unclear on what exactly this does.  Is it like copy-on-read,
or readahead/prefetch?

Not for or against this proposal, but I'd like to add that nbdkit
offers a copy-on-read-like facility already, but in a slightly
different way that doesn't have any impact on the NBD protocol.

Background: nbdkit is a plugin based NBD server, where the idea is
that you use one of the existing plugins (eg. "file") or write your
own.

nbdkit also provides filters which can sit in front of plugins to
change their behaviour.  You can place zero or more filters in front
of a plugin.
[https://github.com/libguestfs/nbdkit/blob/master/docs/nbdkit-filter.pod]

One filter we already provide is called "cache" described as:

  "nbdkit-cache-filter is a filter that adds caching on top of a
  plugin. This is useful if a plugin is slow or expensive to use,
  because nbdkit will try to minimize requests to the plugin by
  caching previous requests."
  [https://github.com/libguestfs/nbdkit/blob/master/filters/cache/nbdkit-cache-filter.pod]

Note this all happens internal to the NBD server so the client will
not see any difference (except perhaps enhanced performance).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html


Reply to: