Re: [Qemu-block] [PATCH v2] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Mon, 05/21 16:58, Fam Zheng wrote: > Coverity doesn't like the tests under fail label (report CID 1385847). > Reset the fields so the clean up order is more apparent. > > Signed-off-by: Fam Zheng Queued, thanks. Fam

Re: [Qemu-block] [Qemu-devel] [PATCH v2 17/40] job: Move BlockJobCreateFlags to Job

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 00:24 hat John Snow geschrieben: > > > On 05/18/2018 09:20 AM, Kevin Wolf wrote: > > +job->auto_finalize = !(flags & JOB_MANUAL_FINALIZE); > > +job->auto_dismiss = !(flags & JOB_MANUAL_DISMISS); > > Job API might be a good chance to say "No, this is the default behavior

Re: [Qemu-block] [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 01:18 hat John Snow geschrieben: > > diff --git a/include/qemu/job.h b/include/qemu/job.h > > index 3e817beee9..2648c74281 100644 > > --- a/include/qemu/job.h > > +++ b/include/qemu/job.h > > @@ -97,6 +97,12 @@ typedef struct Job { > > */ > > bool cancelled; > > > > +

Re: [Qemu-block] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-24 Thread Fam Zheng
On Wed, 05/23 13:28, Eric Blake wrote: > On 05/22/2018 10:04 PM, Fam Zheng wrote: > > We don't verify the request range against s->size in the I/O callbacks > > except for raw_co_pwritev. This is wrong (especially for > > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. > > I'd also mention

Re: [Qemu-block] [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 01:42 hat John Snow geschrieben: > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > > Instead of having a 'bool ready' in BlockJob, add a function that > > derives its value from the job status. > > > > At the same time, this fixes the behaviour to match what the QAPI > > documentation

Re: [Qemu-block] [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 02:02 hat John Snow geschrieben: > > > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > > This adds a QMP event that is emitted whenever a job transitions from > > one status to another. > > > > Signed-off-by: Kevin Wolf > > That's a lot of events, and a lot are redundant to what w

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Kashyap Chamarthy
On Mon, May 21, 2018 at 05:33:22PM -0300, Eduardo Habkost wrote: > On Mon, May 21, 2018 at 09:18:17PM +0100, Daniel P. Berrangé wrote: [...] (Just catching up with this thread.) [...] > > > I have very specific goal here: the goal is to make it less > > > painful to users when OpenStack+libvirt

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Richard W.M. Jones
On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > The closest to a cross-hypervisor standard is OVF which can store > metadata about required hardware for a VM. I'm pretty sure it does > not have the concept of machine types, but maybe it has a way for > people to define metadat

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Richard W.M. Jones
I read the whole thread and the fundamental problem is that you're mixing layers. Let qcow2 be a disk image format, and let management layers deal with metadata and how to run qemu. What's going to happen when you have (eg) an OVA file containing qcow2 files, and the qcow2 files all have differen

Re: [Qemu-block] [Qemu-devel] [PULL 00/46] Block layer patches

2018-05-24 Thread Peter Maydell
On 23 May 2018 at 14:11, Kevin Wolf wrote: > The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d: > > Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' > into staging (2018-05-22 09:43:58 +0100) > > are available in the git repository at: > > g

Re: [Qemu-block] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-24 Thread Stefan Hajnoczi
On Tue, May 15, 2018 at 06:25:46PM -0300, Daniel Henrique Barboza wrote: > This means that the test executed a write at  LBA 0x94fa and, after > confirming that the write was completed, issue 2 reads in the same LBA to > assert the written contents and found out a mismatch. Have you confirmed this

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > There is however a seed of a good idea in the thread: > > > I don't think QEMU needs to use this information automatically, > > necessarily. I think the first step is to simply make QEMU save > > this information in the disk im

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Kevin Wolf
Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > > There is however a seed of a good idea in the thread: > > > > > I don't think QEMU needs to use this information automatically, > > > necessarily. I think the first

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 05:08:17PM +0200, Kevin Wolf wrote: > Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: > > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > > > There is however a seed of a good idea in the thread: > > > > > > > I don't think QEMU needs to use

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Richard W.M. Jones
On Thu, May 24, 2018 at 05:08:17PM +0200, Kevin Wolf wrote: > Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: > > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: > > > There is however a seed of a good idea in the thread: > > > > > > > I don't think QEMU needs to use

Re: [Qemu-block] [Qemu-devel] storing machine data in qcow images?

2018-05-24 Thread Markus Armbruster
"Richard W.M. Jones" writes: > On Thu, May 24, 2018 at 05:08:17PM +0200, Kevin Wolf wrote: >> Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben: >> > On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote: >> > > There is however a seed of a good idea in the thread: >> > > >>

Re: [Qemu-block] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Paolo Bonzini
On 21/05/2018 08:35, Fam Zheng wrote: > Coverity doesn't like the tests under fail label (report CID 1385847). > Reset the fields so the clean up order is more apparent. > > Signed-off-by: Fam Zheng > --- > block/nvme.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/block/nvme.

Re: [Qemu-block] [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-24 Thread John Snow
On 05/24/2018 04:30 AM, Kevin Wolf wrote: > Am 24.05.2018 um 01:42 hat John Snow geschrieben: >> On 05/18/2018 09:21 AM, Kevin Wolf wrote: >>> Instead of having a 'bool ready' in BlockJob, add a function that >>> derives its value from the job status. >>> >>> At the same time, this fixes the beha

Re: [Qemu-block] [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread John Snow
On 05/24/2018 04:36 AM, Kevin Wolf wrote: > Am 24.05.2018 um 02:02 hat John Snow geschrieben: >> >> >> On 05/18/2018 09:21 AM, Kevin Wolf wrote: >>> This adds a QMP event that is emitted whenever a job transitions from >>> one status to another. >>> >>> Signed-off-by: Kevin Wolf >> >> That's a l

Re: [Qemu-block] [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-24 Thread John Snow
On 05/24/2018 04:24 AM, Kevin Wolf wrote: > Am 24.05.2018 um 01:18 hat John Snow geschrieben: >>> diff --git a/include/qemu/job.h b/include/qemu/job.h >>> index 3e817beee9..2648c74281 100644 >>> --- a/include/qemu/job.h >>> +++ b/include/qemu/job.h >>> @@ -97,6 +97,12 @@ typedef struct Job { >>>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 17/40] job: Move BlockJobCreateFlags to Job

2018-05-24 Thread John Snow
On 05/24/2018 04:17 AM, Kevin Wolf wrote: > Am 24.05.2018 um 00:24 hat John Snow geschrieben: >> >> >> On 05/18/2018 09:20 AM, Kevin Wolf wrote: >>> +job->auto_finalize = !(flags & JOB_MANUAL_FINALIZE); >>> +job->auto_dismiss = !(flags & JOB_MANUAL_DISMISS); >> >> Job API might be a good

Re: [Qemu-block] [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread Eric Blake
On 05/24/2018 12:36 PM, John Snow wrote: On 05/18/2018 09:21 AM, Kevin Wolf wrote: This adds a QMP event that is emitted whenever a job transitions from one status to another. Signed-off-by: Kevin Wolf The question that I was asking myself was just whether I'd literally duplicate the exis

Re: [Qemu-block] [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-24 Thread John Snow
On 05/24/2018 02:22 PM, Eric Blake wrote: > On 05/24/2018 12:36 PM, John Snow wrote: > On 05/18/2018 09:21 AM, Kevin Wolf wrote: > This adds a QMP event that is emitted whenever a job transitions from > one status to another. > > Signed-off-by: Kevin Wolf > >>> >>> The que

Re: [Qemu-block] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-24 Thread Daniel Henrique Barboza
On 05/24/2018 11:04 AM, Stefan Hajnoczi wrote: On Tue, May 15, 2018 at 06:25:46PM -0300, Daniel Henrique Barboza wrote: This means that the test executed a write at  LBA 0x94fa and, after confirming that the write was completed, issue 2 reads in the same LBA to assert the written contents and

Re: [Qemu-block] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Thu, 05/24 19:16, Paolo Bonzini wrote: > On 21/05/2018 08:35, Fam Zheng wrote: > > Coverity doesn't like the tests under fail label (report CID 1385847). > > Reset the fields so the clean up order is more apparent. > > > > Signed-off-by: Fam Zheng > > --- > > block/nvme.c | 7 +++ > > 1 f

Re: [Qemu-block] [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Markus Armbruster
Fam Zheng writes: > On Thu, 05/24 19:16, Paolo Bonzini wrote: >> On 21/05/2018 08:35, Fam Zheng wrote: >> > Coverity doesn't like the tests under fail label (report CID 1385847). >> > Reset the fields so the clean up order is more apparent. >> > >> > Signed-off-by: Fam Zheng >> > --- >> > bloc

Re: [Qemu-block] [Qemu-devel] [PATCH] nvme: Make nvme_init error handling code more readable

2018-05-24 Thread Fam Zheng
On Fri, 05/25 07:47, Markus Armbruster wrote: > Fam Zheng writes: > > > On Thu, 05/24 19:16, Paolo Bonzini wrote: > >> On 21/05/2018 08:35, Fam Zheng wrote: > >> > Coverity doesn't like the tests under fail label (report CID 1385847). > >> > Reset the fields so the clean up order is more apparent