On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
>
> To make sure "host" is still at the end of t
On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
>
> To make sure "host" is still at the end of t
On Tue, Jan 17, 2017 at 01:42:08PM +, Richard W.M. Jones wrote:
> On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> > Change the meaning of "-cpu host" to "enable all features
> > supported by the accelerator in the current host", so that it
Oh no wait, these errors are just because of the new version of qemu
that I am using to test your patch, so nothing to do with this patch.
/me fires up git bisect ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization b
On Tue, Jan 17, 2017 at 12:05:41PM -0200, Eduardo Habkost wrote:
> On Tue, Jan 17, 2017 at 01:57:34PM +0000, Richard W.M. Jones wrote:
> >
> > Oh no wait, these errors are just because of the new version of qemu
> > that I am using to test your patch, so nothing
On Thu, Jan 19, 2017 at 10:19:29AM -0600, Eric Blake wrote:
> On 01/19/2017 09:49 AM, Daniel P. Berrange wrote:
> > On Thu, Jan 19, 2017 at 10:38:14PM +0800, Fam Zheng wrote:
> >> This implements open flag sensible image locking for local file
> >> and host device protocol.
> >>
> >> virtlockd in l
#39: FILE: qemu-nbd.c:585:
+signal(SIGPIPE, foobar);
total: 1 errors, 0 warnings, 10 lines checked
Signed-off-by: Richard W.M. Jones
---
scripts/checkpatch.pl | 9 +
1 file changed, 9 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 45027b9281
occurrence in
> QEMU source code, so allow that.
>
> Signed-off-by: Paolo Bonzini
This looks good. Ignore the parallel version which I just sent :-(
Reviewed-by: Richard W.M. Jones
Rich.
> scripts/checkpatch.pl | 4
> 1 file changed, 4 insertions(+)
>
> diff
Ignore this, Paolo also sent a similar patch after we were discussing
this on IRC.
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://li
On Mon, May 15, 2017 at 12:00:52PM +0200, Paolo Bonzini wrote:
> Compared to v2, this silences checkpatch and correctly destroy the mutex on
> exiting from curl_open with an error.
FWIW I hit the curl bug again and tested the current patch
series, and it also fixes the bug (as expected).
Rich.
-
On Fri, May 19, 2017 at 04:41:46PM -0300, Eduardo Habkost wrote:
> On Tue, May 09, 2017 at 07:18:07AM -0700, Richard Henderson wrote:
> > On 05/09/2017 07:13 AM, Richard W.M. Jones wrote:
> > > On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote:
> > >
On Fri, May 19, 2017 at 04:41:46PM -0300, Eduardo Habkost wrote:
> On Tue, May 09, 2017 at 07:18:07AM -0700, Richard Henderson wrote:
> > On 05/09/2017 07:13 AM, Richard W.M. Jones wrote:
> > > On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote:
> > >
On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote:
> On 28.05.2017 07:18, Rob Landley wrote:
> > You can't boot a kernel under -cpu 486 since that commit (hangs
> > producing no output) because it added a bios image that won't run on
> > anything short of pentium II.
> >
> > You can try
On Tue, May 30, 2017 at 02:05:15PM -0500, Rob Landley wrote:
> On 05/29/2017 05:14 AM, Richard W.M. Jones wrote:
> > I see in the disassembly use of cmovne (new in Pentium Pro) and
> > bswap (new in 486).
> > [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/Inst
On Wed, May 31, 2017 at 02:44:18PM +0200, Paolo Bonzini wrote:
> The ROM uses the cmovne instruction, which is new in Pentium Pro and does not
> work when running QEMU with "-cpu 486". Avoid producing that instruction.
>
> Suggested-by: Richard W.M. Jones
> Suggested-by
On Wed, May 31, 2017 at 06:54:33PM +0300, Pavel Butsykin wrote:
> It is assumed that the user has already made a preparatory with the
> image:
> 1. freeing space at the end of the image
> 2. reducing the last partition on the disk
> 3. rebuilding fs
> Only after these steps, the user can reduce the
On Tue, Jul 25, 2017 at 04:26:32PM -0700, Alistair Francis wrote:
> Actually, what about to avoid duplication we can add a make check-slow
> that runs all the slow tests that make check doesn't run. Then make
> check-all can run both make check and make check-slow.
>
> That way you can run make ch
On Wed, Jul 26, 2017 at 02:00:14PM +0200, Bastian Koppelmann wrote:
> Hi Samuel,
>
> On 07/25/2017 04:31 PM, Samuel Falvo II wrote:
> > For those of us who are not in the know, how does target/s390 decoding work?
>
> sorry about that. I was going into this with a QEMU-dev mindset :)
>
> The basi
-"- ditto -"- virtqueue_size=64: 318 disks
-"- ditto -"- virtqueue_size=16: 775 disks
With scsi-mq disabled (kernel before 5c279bd9e406): 1755 disks
Note that to have any effect, this requires a kernel patch:
https://lkml.org/lkml/2017/8/10/689
Sig
On Fri, Dec 01, 2017 at 04:15:38PM +0100, Eric Farman wrote:
> Commit 5c0919d02066 ("virtio-scsi: Add virtqueue_size parameter allowing
> virtqueue size to be set.") introduced a new parameter to virtio-scsi.
> Later, commit 920036106044 ("vhost-user-scsi: add missing virtqueue_size
> param") added
On Thu, Nov 09, 2017 at 10:59:34AM -0600, Eric Blake wrote:
> The NBD spec says that clients should not try to write/trim to
> an export advertised as read-only by the server. But we failed
> to check that, and would allow the block layer to use NBD with
> BDRV_O_RDWR even when the server is read-
I did a bit of work on this back in early 2016 and wrote a paper which
analyzes what Intel were doing with Clear Containers back then, and
how it fitted with the more distribution-centric view of Fedora and
Red Hat, ie that we ideally want a single qemu binary, a single
kernel, a single SeaBIOS, et
[CC to qemu-devel since I'm obviously doing something wrong here,
I'm just not sure what.]
I was getting ready to add multiple threads to ‘qemu-img convert’ (the
longest part of v2v conversions) when I noticed that it had them
already! (To be fair this was only added in February this year so no
w
me check for this.
>
> [1] https://red.libssh.org/issues/242
>
> Signed-off-by: Pino Toscano
I haven't reviewed this in detail, but I have tested it and I was able
to boot a VM remotely over ssh, do lots of heavy reads and writes, and
at no time did it hang/crash. So:
Tested-by: Richard
On Wed, Nov 15, 2017 at 04:52:56PM +0100, Gandalf Corvotempesta wrote:
> I'm thinking if support for XVA files could be added to qemu-img
> The file-format is well known (it's just a tar archive) and there are scripts
> that are able to convert an XVA file to a RAW image. (ie:
> https://gist.github
On Wed, Nov 15, 2017 at 09:07:12PM +0100, Max Reitz wrote:
> On 2017-11-15 21:06, Gandalf Corvotempesta wrote:
> > 2017-11-15 20:59 GMT+01:00 Max Reitz :
> >> Well, you can't just add support to qemu-img alone either. Every image
> >> format supported by qemu-img is one supported by qemu as a whol
On Wed, Nov 15, 2017 at 09:27:14PM +0100, Max Reitz wrote:
> On 2017-11-15 21:24, Richard W.M. Jones wrote:
> > On Wed, Nov 15, 2017 at 09:07:12PM +0100, Max Reitz wrote:
> >> On 2017-11-15 21:06, Gandalf Corvotempesta wrote:
> >>> 2017-11-15 20:59 GMT+01:00 Max Reitz
On Wed, Nov 15, 2017 at 09:41:20PM +0100, Gandalf Corvotempesta wrote:
> 2017-11-15 21:29 GMT+01:00 Richard W.M. Jones :
> > Gandalf, is there an XVA file publically available (pref. not
> > too big) that we can look at?
>
> I can try to provide one, but it
On Wed, Nov 15, 2017 at 09:05:00PM +, Richard W.M. Jones wrote:
> This will give you one offset/size/filename tuple for each file. The
> plugin will then simply need to calculate which file to access to
> resolve each virtual file range (or substitute zeroes for missing
> files).
On Wed, Nov 15, 2017 at 10:42:42PM +0100, Gandalf Corvotempesta wrote:
> I'm thinking on how to prove you a sample XVA
> I have to create (and populate) a VM because an empty image will result in
> an empty XVA
> And a VM is 300-400Mb as minimum
That's fine to download. Also you could compress it
On Wed, Nov 15, 2017 at 10:30:31PM +0100, Max Reitz wrote:
> Hmmm... OK, so as Rich said, you can use the raw driver with an offset
> and a size. And you can use the null-co driver to emulate holes. And
> qemu-img convert supports concatenation.
Nice, I didn't know qemu-img convert could concat
Here's my solution, as a nbdkit plugin written in Perl.
As with Max's solution I don't bother to parse the virtual size out of
the XML file, so you need to specify that on the command line
otherwise the disk will be truncated to the largest extent stored in
the file. Also the ‘.xva’ file must not
On Thu, Nov 16, 2017 at 11:07:10AM +0100, Gandalf Corvotempesta wrote:
> 2017-11-16 11:01 GMT+01:00 Richard W.M. Jones :
> > As mentioned before you can use this to do a qemu-img convert using
> > captive nbdkit:
> >
> > $ nbdkit -U - \
> >
I think it's even possible to modify that shell script to pipe into
nbdkit and from there to ‘qemu-img convert’. I'm too lazy to actually
do that right now, but the basic idea is here:
https://rwmj.wordpress.com/2014/10/14/streaming-nbd-server/
You'll probably have to add ‘-m 1’ to the qemu-im
On Thu, Nov 16, 2017 at 02:47:46PM +, Stefan Hajnoczi wrote:
> The threads you observed are the thread pool that performs
> preadv(2)/pwritev(2) syscalls. The Linux AIO API could be used instead
> and does not use threads for read and write operations.
I guess if I used AIO then I wouldn't ge
On Thu, Nov 16, 2017 at 03:51:29PM +0100, Peter Lieven wrote:
> Afaik all writes to the same QCOW2 serialize because of the s->lock that
> is held during the write. So its not suprising that there is no benefit from
> mutliple threads as long as reading from the RAW file involves no delay.
> Which
On Thu, Nov 16, 2017 at 05:30:48PM +, Stefan Hajnoczi wrote:
> On Thu, Nov 16, 2017 at 3:10 PM, Richard W.M. Jones wrote:
> > Both local filesystems, but on different SATA devices.
>
> Okay. I'm curious what the strace -f output looks like (only the
> preadv(2)/
On Wed, Mar 22, 2017 at 09:45:24AM -0500, Eric Blake wrote:
> A regression in commit 15c2f669e caused us to silently ignore
> excess input to the QemuOpts visitor. Later, commit ea4641
> accidentally abused that situation, by removing "qom-type" and
> "id" from the corresponding QDict but leaving
emu_opts_set_id(opts, (char *) id);
> +qemu_opt_set(opts, "qom-type", type, &error_abort);
> g_free(type);
> QDECREF(pdict);
> return obj;
Thanks Eric. Yes, this fixes the problem I observed before
with libguestfs.
Tested-by: Richard W.M. Jones
Hello Frediano,
I'm tracking a rather difficult bug in qemu, where it appears that
events in the glib loop are "lost". This is characterized by the
emulated qemu serial console hanging until someone presses a key.
This is normally disguised in the busy main loop of qemu (since some
other event tu
On Fri, Mar 31, 2017 at 05:43:22PM +0100, Stefan Hajnoczi wrote:
> The ISA serial port device's output can hang when the pipe on stdout
> becomes full. This is a race condition where the vcpu thread executing
> serial emulation code adds a watch on stdout while the main loop thread
> is blocked in
2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones"
Date: Fri, 31 Mar 2017 18:29:01 +0100
Subject: [PATCH] main-loop: Acquire main_context lock around
os_host_main_loop_wait.
---
util/main-loop.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/util/main-loop.c b/util/
On Fri, Mar 31, 2017 at 07:31:57PM +0200, Paolo Bonzini wrote:
>
>
> On 31/03/2017 19:31, Richard W.M. Jones wrote:
> > On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote:
> >> glib is expecting QEMU to use g_main_context_acquire around accesses to
> >&g
, Intel Core i7 and Intel Xeon), over many hours
of automated testing. I wasn't able to reproduce the early boot hangs
(but as noted above, these are extremely rare in any case).
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1435432
Reported-by: Richard W.M. Jones
Tested-by: Richard
On Fri, Mar 31, 2017 at 09:51:33PM +0100, Richard W.M. Jones wrote:
> When running virt-rescue the serial console hangs from time to time.
> Virt-rescue runs an ordinary Linux kernel "appliance", but there is
> only a single idle process running inside, so the qemu main loo
On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote:
> On 01/19/2017 08:38 AM, Eric Blake wrote:
> > On 01/19/2017 03:25 AM, Markus Armbruster wrote:
> >> Eric Blake writes:
> >>
> >>> Quite a few users of qdict_put() were manually wrapping a
> >>> non-QObject. We can make such call-sites s
On Wed, Apr 05, 2017 at 10:21:13AM +0200, Julia Lawall wrote:
>
>
> On Wed, 5 Apr 2017, Richard W.M. Jones wrote:
>
> > On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote:
> > > On 01/19/2017 08:38 AM, Eric Blake wrote:
> > > > On 01/19
On Wed, Apr 05, 2017 at 10:38:37AM +0200, Julia Lawall wrote:
> OK, there is nothing special about g_assert_cmpint, but Coccinelle expects
> expressions or types in function argument lists, so it gives a parse error
> on finding an ==.
I should have checked the coccinelle mailing list before askin
On Wed, Apr 05, 2017 at 02:47:35PM -0500, Eric Blake wrote:
> We now have macros in place to make it less verbose to add a scalar
> to QDict and QList, so use them.
>
> Patch created mechanically via:
> spatch --sp-file scripts/coccinelle/qobject.cocci \
> --macro-file scripts/cocci-macro-fi
On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote:
> This adds assertions that ensure that the necessary write permissions
> have been granted before someone attempts to write to a node.
>
> Signed-off-by: Kevin Wolf
> Acked-by: Fam Zheng
> Reviewed-by: Max Reitz
> ---
> block/io.c |
On Thu, Apr 06, 2017 at 04:03:28PM -0500, Eric Blake wrote:
> On 04/06/2017 03:59 PM, Richard W.M. Jones wrote:
> > On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote:
> >> This adds assertions that ensure that the necessary write permissions
> >> have been gran
On Thu, Apr 06, 2017 at 04:23:19PM -0500, Eric Blake wrote:
> On 04/06/2017 04:15 PM, Richard W.M. Jones wrote:
>
> >>>> +++ b/block/io.c
> >>>> @@ -945,6 +945,8 @@ static int coroutine_fn
> >>>> bdrv_co_do_copy_on_readv(BdrvChild *child,
;
> +ssh_flush(void) "fsync"
> +ssh_check_host_key_knownhosts(const char *key) "host key OK: %s"
> +ssh_connect_to_ssh(char *path, int flags, int mode) "opening file %s
> flags=0x%x creat_mode=0%o"
> +ssh_co_yield(int sock, void *rd_handler, void *w
gt; ssh_write_buf(void *buf, size_t size) "sftp_write buf=%p size=%zu"
> ssh_write_return(size_t ret) "sftp_write returned %zd"
> ssh_seek(uint64_t offset) "seeking to offset=%" PRIi64
> +
> +# block/curl.c
> +curl_timer_cb(long timeout_ms) "timer callback
On Wed, Dec 12, 2018 at 04:04:10PM -0600, Eric Blake wrote:
> When a qemu-io command fails, it's best if the failure message
> goes to stderr rather than stdout.
>
> Reported-by: Richard W.M. Jones
> Signed-off-by: Eric Blake
A straightforward, albeit lengthy, replac
oes to stderr rather than stdout.
> > >
> > > Reported-by: Richard W.M. Jones
> > > Signed-off-by: Eric Blake
> > > ---
> > >
> > > RFC because at least iotest 60 (found by -qcow2 -g quick) breaks due
> > > to reordering of output lines,
On Tue, Nov 06, 2018 at 02:17:46PM +0800, Dongli Zhang wrote:
> On 11/06/2018 01:49 AM, Eric Blake wrote:
> > On 11/2/18 3:11 AM, Dongli Zhang wrote:
> >> Hi,
> >>
> >> Is there any way to emulate I/O timeout on qemu side (not fault
> >> injection in VM kernel) without modifying qemu source code?
>
On Tue, Nov 06, 2018 at 09:14:57AM +, Richard W.M. Jones wrote:
> This link shows how to combine delay and error filters together:
>
> https://rwmj.wordpress.com/2018/11/04/nbd-graphical-viewer/
Oops, that's in a forthcoming blog post not this one. Not enough
caffein
On Tue, Nov 06, 2018 at 09:43:06AM +, Richard W.M. Jones wrote:
> On Tue, Nov 06, 2018 at 09:14:57AM +0000, Richard W.M. Jones wrote:
> > This link shows how to combine delay and error filters together:
> >
> > https://rwmj.wordpress.com/2018/11/04/nbd-graphical-viewer/
(I'm not going to claim this is a bug, but it causes a large, easily
measurable performance regression in virt-v2v).
In qemu 2.10, when you do ‘qemu-img convert’ to an NBD target, qemu
interleaves write and zero requests. We can observe this as follows:
$ virt-builder fedora-28
$ nbdkit --fi
Another thing I tried was to change the NBD server (nbdkit) so that it
doesn't advertise zero support to the client:
$ nbdkit --filter=log --filter=nozero memory size=6G logfile=/tmp/log \
--run './qemu-img convert ./fedora-28.img -n $nbd'
$ grep '\.\.\.$' /tmp/log | sed 's/.*\([A-Z][a-z
On Wed, Nov 07, 2018 at 04:56:48PM +0200, Nir Soffer wrote:
> Wed, Nov 7, 2018 at 4:36 PM Richard W.M. Jones wrote:
>
> > Another thing I tried was to change the NBD server (nbdkit) so that it
> > doesn't advertise zero support to the client:
> >
> > $
I’m pleased to announce the next stable release of nbdkit.
NBD — Network Block Device — is a protocol for accessing Block Devices
(hard disks and disk-like things) over a Network. nbdkit is a toolkit
for creating NBD servers.
The key features are:
* Multithreaded NBD server written in C with g
On Wed, Nov 14, 2018 at 01:59:25PM +0100, Markus Armbruster wrote:
> Marc-André Lureau writes:
>
> > Hi,
> >
> > Based-on: https://people.debian.org/~sthibault/qemu.git/ slirp branch
> >
> > This series goal is to allow building libslirp as an independent library.
> >
> > While looking at making
On Wed, Nov 14, 2018 at 03:46:39PM +0100, Markus Armbruster wrote:
> The issue I have with SLIRP isn't that it solves a useless problem (au
> contraire!), it's that it's a useless solution. Okay, that's an unfair
> exaggeration, it's not useless, I just wouldn't trust it in production,
> unless it
, Nov 7, 2018 at 7:55 PM Nir Soffer wrote:
> > > >
> > > >> On Wed, Nov 7, 2018 at 7:27 PM Kevin Wolf wrote:
> > > >>
> > > >>> Am 07.11.2018 um 15:56 hat Nir Soffer geschrieben:
> > > >>> > Wed, Nov 7, 2018 at 4:36 PM Ri
On Sat, Oct 13, 2018 at 11:53:23AM +0200, Paolo Bonzini wrote:
> rerror=ignore was returning true from scsi_handle_rw_error but the callers
> were not
> calling scsi_req_complete when rerror=ignore returns true (this is the
> correct thing
> to do when true is returned after executing a passthrou
On Thu, Oct 11, 2018 at 07:59:59AM +0200, Andrea Bolognani wrote:
> On Wed, 2018-10-10 at 10:57 -0700, Alistair wrote:
> > On 10/10/2018 05:26 AM, Andrea Bolognani wrote:
> > > * what should libvirt look for to figure out whether or not a RISC-V
> > >guest will have PCI support? For aarch64 we
On Thu, Oct 11, 2018 at 07:59:59AM +0200, Andrea Bolognani wrote:
> On Wed, 2018-10-10 at 10:57 -0700, Alistair wrote:
> > I use this monolithic config:
> > https://github.com/alistair23/meta-riscv/blob/7a950aa705b439b5ec19bb6f094930888335ba7b/recipes-kernel/linux/files/freedom-u540/defconfig
> >
On Thu, Oct 11, 2018 at 09:01:14AM +0100, Richard W.M. Jones wrote:
> Here are the settings we currently do NOT have in my RV kernel:
>
> CONFIG_HOTPLUG_PCI_PCIE=y
> CONFIG_HOTPLUG_PCI=y
> CONFIG_MEDIA_PCI_SUPPORT=y
> CONFIG_PCI_ATS=y
> CONFIG_PCI_DEBUG
FWIW I don't have anything to add - agree with what's been said already.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot
On Thu, Oct 04, 2018 at 12:10:17PM +, Vladimir Sementsov-Ogievskiy wrote:
> this is a bit more difficult and more overhead than option in Qemu.. But
> I don't sure we should care about
I think Eric's point is that dropping oldstyle in qemu-nbd isn't
really a problem because nbdkit has no plan
ailed.
Kevin Wolf suggested this fix:
< kwolf> Hm, should the final return false; in that patch
actually be a return true?
< kwolf> Because I think he didn't intend to change anything
except BLOCK_ERROR_ACTION_IGNORE
Signed-off-by: Richard W.M. Jones
Bugli
ption negotiation failed: Verify failed: No certificate was found.
> +qemu-nbd: option negotiation failed: Verify failed: No certificate was found.
> qemu-img: Could not open
> 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't
> got a known is
ected %u (%s)",
> + reply.type, nbd_rep_lookup(reply.type),
> + NBD_REP_ACK, nbd_rep_lookup(NBD_REP_ACK));
> nbd_send_opt_abort(ioc);
> return -1;
> }
The NBD protocol doc seems to use integers pretty consistently (and
c
device) {
> +#if HAVE_NBD_DEVICE
> int ret;
>
> ret = pthread_create(&client_thread, NULL, nbd_client_thread,
> device);
> @@ -1013,6 +1027,10 @@ int main(int argc, char **argv)
> error_report("Failed to create client thread: %s",
>
)
> }
> fd_size -= dev_offset;
>
> -if (partition != -1) {
> + if (partition) {
> ret = find_partition(blk, partition, &dev_offset, &fd_size);
> if (ret < 0) {
> error_report("Could not find partition %d: %s"
ldq_be_p(buf);
> +magic = be64_to_cpu(magic);
> trace_nbd_receive_negotiate_magic(magic);
>
> -if (memcmp(buf, "NBDMAGIC", 8) != 0) {
> +if (magic != NBD_INIT_MAGIC) {
> error_setg(errp, "Invalid magic received");
> goto fail;
&
(info.name);
> kill(getpid(), SIGTERM);
> return (void *) EXIT_FAILURE;
> }
> diff --git a/nbd/trace-events b/nbd/trace-events
> index 5e1d4afe8e6..289337d0dc3 100644
> --- a/nbd/trace-events
> +++ b/nbd/trace-events
> @@ -15,7 +15,7 @@ nbd_opt_meta_reply(const c
info->size = be64_to_cpu(info->size);
>
> if (nbd_read(ioc, &oldflags, sizeof(oldflags), errp) < 0) {
> error_prepend(errp, "Failed to read export flags: ");
> - goto fail;
> +return -EINVAL;
>
On Fri, Nov 30, 2018 at 04:03:29PM -0600, Eric Blake wrote:
> I note that upstream NBD has 'nbd-client -l $host' for querying
> just export names (with no quoting, so you have to know that
> a blank line means the default export), but it wasn't powerful
> enough, so I implemented 'qemu-nbd -L' to d
ace-events b/nbd/trace-events
> index 289337d0dc3..5d0d202fad2 100644
> --- a/nbd/trace-events
> +++ b/nbd/trace-events
> @@ -10,7 +10,7 @@ nbd_receive_query_exports_start(const char *wantname)
> "Querying export list for
> nbd_receive_query_exports_success(const char *wantnam
want)) {
> *match = true;
> }
> return 1;
> @@ -498,7 +525,8 @@ static int nbd_receive_query_exports(QIOChannel *ioc,
> }
>
> while (1) {
> -int ret = nbd_receive_list(ioc, wantname, &foundExport, errp);
> +int
ke(void) "Starting TLS handshake"
> nbd_opt_meta_request(const char *opt, const char *context, const char
> *export) "Requesting to %s %s for export %s"
> nbd_opt_meta_reply(const char *context, uint32_t id) "Received mapping of
> context %s to id %"
nbd_init(int fd, QIOChannelSocket *sioc, NBDExportInfo *info,
> Error **errp)
> diff --git a/nbd/trace-events b/nbd/trace-events
> index 570b04997ff..2cf83ebed15 100644
> --- a/nbd/trace-events
> +++ b/nbd/trace-events
> @@ -2,7 +2,7 @@
> nbd_send_option_request(uint32_t op
On Fri, Nov 30, 2018 at 04:03:42PM -0600, Eric Blake wrote:
> We want to be able to detect whether a given qemu NBD server is
> exposing the right export(s) and dirty bitmaps, at least for
> regression testing. We could use 'nbd-client -l' from the upstream
> NBD project to list exports, but it's
CA fails ==
> qemu-nbd: option negotiation failed: Verify failed: No certificate was found.
> qemu-img: Could not open
> 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't
> got a known issuer
> +qemu-nbd: option negotiation failed: Verify fai
On Sat, Dec 01, 2018 at 07:57:51AM -0600, Eric Blake wrote:
> On 12/1/18 1:42 AM, Richard W.M. Jones wrote:
> >On Fri, Nov 30, 2018 at 04:03:29PM -0600, Eric Blake wrote:
> >>I note that upstream NBD has 'nbd-client -l $host' for querying
> >>just export names
On Fri, Dec 14, 2018 at 12:52:34PM +, De Backer, Fred (Nokia - BE/Antwerp)
wrote:
> >Of course, we should also think about the other problem you mentioned,
> >related to copying a smaller image to a larger block device. Does this
> >require zeroing the parts after the image or should we leav
On Sat, Dec 15, 2018 at 07:53:06AM -0600, Eric Blake wrote:
> Document some useful qemu-nbd command lines. Mention some restrictions
> on particular options, like -p being only for MBR images, or -c/-d
> being Linux-only. Update some text given the recent change to no
> longer serve oldstyle proto
ects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
>
> for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
> - BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
> + BUGS NOTES FOOTNOTES EXAMPLES SEEALSO AUTHOR COPYRIGHT)) {
> i
int argc, char **argv)
> nbd_export_set_description(exp, export_description);
>
> if (device) {
> +#if HAVE_NBD_DEVICE
> int ret;
>
> ret = pthread_create(&client_thread, NULL, nbd_client_thread,
> device);
> @@ -1013,6 +1029,7 @@ in
dditional patches from the corresponding stable branch to fix bugs in
> +the operation of that feature.
> +
> +* 2.6: NBD_OPT_STARTTLS with TLS X.509 Certificates
> +* 2.8: NBD_CMD_WRITE_ZEROES
> +* 2.10: NBD_OPT_GO, NBD_INFO_BLOCK
> +* 2.11: NBD_OPT_STRUCTURED_READ
> +* 2.12:
-if (shared < 1) {
> -error_report("Shared device number must be greater than 0");
> -exit(EXIT_FAILURE);
> -}
> break;
> case 'f':
> fmt = optarg;
> @@ -1006,7 +993,7
t; -if (received) {
> -*context_id = received_id;
> -return 1;
> -}
> -
> -return 0;
> +return received;
> }
>
> int nbd_receive_negotiate(QIOChannel *ioc, QCryptoTLSCreds *tlscreds,
> @@ -846,10 +846,7 @@ int nbd_receive_negotiate(QIOChannel *ioc,
>
+2,7 @@
> nbd_send_option_request(uint32_t opt, const char *name, uint32_t len)
> "Sending option request %" PRIu32" (%s), len %" PRIu32
> nbd_receive_option_reply(uint32_t option, const char *optname, uint32_t
> type, const char *typename, uint32_t length) &
On Sat, Dec 15, 2018 at 07:53:14AM -0600, Eric Blake wrote:
> Always allocate space for the reply returned by the server and
> hoist the trace earlier, as it is more interesting to trace the
> server's reply (even if it is unexpected) than parroting our
> request only on success. After all, skippi
r
> *export) "Requesting %s %s for export %s"
> nbd_opt_meta_reply(const char *context, uint32_t id) "Received mapping of
> context %s to id %" PRIu32
> nbd_receive_negotiate(void *tlscreds, const char *hostname) "Receiving
> negotiation tlscreds=%p h
d, QIOChannelSocket *sioc, NBDExportInfo *info,
> Error **errp)
> diff --git a/nbd/trace-events b/nbd/trace-events
> index 922b36d1843..a66bf891cc9 100644
> --- a/nbd/trace-events
> +++ b/nbd/trace-events
> @@ -3,7 +3,7 @@ nbd_send_option_request(uint32_t opt, const cha
info->size = be64_to_cpu(info->size);
> -
> -if (nbd_read(ioc, &oldflags, sizeof(oldflags), errp) < 0) {
> -error_prepend(errp, "Failed to read export flags: ");
> - return -EINVAL;
> -}
> -oldfla
901 - 1000 of 1264 matches
Mail list logo