Flexible I/O Tester development
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: fio <fio@vger.kernel.org>,
	eblake@redhat.com, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH v4] engines: Add Network Block Device (NBD) support using libnbd.
Date: Sat, 3 Aug 2019 16:32:06 +0100	[thread overview]
Message-ID: <20190803153206.GY3888@redhat.com> (raw)
In-Reply-To: <CALjAwxgdf_XNwquVDJtSTKRjD9kcXcdM9MoDCZUY2qh9bxwwNg@mail.gmail.com>

On Sat, Aug 03, 2019 at 04:10:07PM +0100, Sitsofe Wheeler wrote:
> On Sat, 3 Aug 2019 at 15:38, Richard W.M. Jones <rjones@redhat.com> wrote:
> > +               **nbd**
> > +                       Synchronous read and write a Network Block Device (NBD).
> 
> I wonder if the engine should be called nbdkit as that's what it uses
> under hood to talk NBD...

libnbd (nbdkit is a server).  libnbd is supposed to be "the" NBD
client library however.  I'm not sure what other NBD engines would be
useful here.

> > +  --enable-libnbd) libnbd="yes"
> > +  ;;
> 
> Why not enable by default if available and then do a probe to see if
> it can be enabled?

Yes, we can do this.  I disabled it out of an abundance of caution, so
that no one's build could be broken if I got it wrong.

> > +       .io_u_free              = nbd_io_u_free,
> > +
> > +       .open_file              = nbd_open_file,
> > +       .invalidate             = nbd_invalidate,
> 
> Do you have to register functions for things that you don't do
> anything (e.g. nbd_io_u_free)?

I think io_u_free is the only one which is an actual no-op (but it
balances the corresponding init function).  I'm not really sure of the
purpose of open_file and invalidate except that other engines also did
the same thing.

> > +offset=064m
> 
> I'd drop the leading 0.

This is a bug, I'll send a follow-up patch to fix it.

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	other threads:[~2019-08-03 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 15:32 [PATCH v4] engines: Add Network Block Device (NBD) support using libnbd Richard W.M. Jones
2019-08-02 15:32 ` Richard W.M. Jones
2019-08-02 15:40   ` Jens Axboe
2019-08-03 15:10   ` Sitsofe Wheeler
2019-08-03 15:32     ` Richard W.M. Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190803153206.GY3888@redhat.com \
    --to=rjones@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=eblake@redhat.com \
    --cc=fio@vger.kernel.org \
    --cc=sitsofe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox