On 06/23/2014 02:47 PM, Peter Lieven wrote: >>> +#ifdef LIBNFS_FEATURE_READAHEAD >>> + } else if (!strcmp(qp->p[i].name, "readahead")) { >>> + nfs_set_readahead(client->context, atoi(qp->p[i].value)); >>> +#endif >> >> I'm not a fan of adding even more special-casing to the file-name URI >> without also adding it to the QAPI schema for use in the blockdev-add >> command. Of course, we don't have structured nfs options for >> blockdev-add yet, but maybe it's time to start thinking about that >> addition before we do this addition. > > I would like to leave this for a follow-up and I promise to take care of this. > If you could give me a pointer of an existing driver that does this as a > reference > I would be grateful.
A good example of a recent conversion to structured options would be the blkdebug and blkverify backends (look around commit 1bf20b82), or proposed addition of new backends (such as archipelego, https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg05309.html). It may be a bigger task than you anticipate, and certainly won't make the 2.1 timeframe, but it's worth doing so if you're up to the task, more power to you :) > > For the read ahead parameter its likely not needed as (at least in my use > case) > the read ahead makes only sense when converting a compressed QCOW2 Template > File > which lives on an NFS Share to a RAW Device. So I use it with qemu-img. > For a Container File that is used as a VM hard drive I would likely not use > read ahead > as the operating system itself will implement some sort of read ahead already. Even if qemu-img is likely to be the only one ever specifying the option, it still makes sense to expose it via QMP, as we are gradually trying to move qemu-img over to more exclusive use of QMP (or at least the underlying functions reached by QMP) rather than ad-hoc code. For example, https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg01822.html). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature