On 02/02/2016 12:10 PM, Programmingkid wrote:
>> There was/is no leak because it qdict_get_str() returns 'const char *' and
>> so nothing needs freeing. So your change is still a backwards steps IMHO.
>
> char filename[MAXPATHLEN];
> snprintf(filename, MAXPATHLEN, "%s", qdict_get_str(options,
From: Fam Zheng
Now that all drivers return the right "file" pointer, we can use it.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
Message-id: 1453780743-16806-14-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
From: Fam Zheng
"offset" is the offset of cluster and sector_num doesn't necessarily
refer to the start of it, it should add index_in_cluster.
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-12-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
On 02/02/2016 10:28 AM, Programmingkid wrote:
>> Whats the rationale here ? Using pre-allocated fixed
>> length arrays is pretty bad practice in general, but
>> especially so for filenames
>
> With an automatic variable there is no worry about when to release it.
Yeah, but it comes with the
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-3-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qcow.c
Recently, qemu iotest 013 has started to fail for me:
Fedora release 22 (Twenty Two)
3.5.0-9.fc22
clang version 3.5.0 (tags/RELEASE_350/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
+4 KiB/home/jsnow/src/qemu/qemu-io-cmds.c:230:18: runtime error:
division by zero
The problem is
ping, I think this one is up to you, jtc?
On 01/26/2016 06:54 PM, John Snow wrote:
> This is a small collection of patches to reduce our use of the bs->job
> pointer where possible. There are still more usages in the code, but
> this cuts down on a few.
>
> The goal is to eventually eliminate
On 02/02/2016 01:03 PM, John Snow wrote:
> The problem is that in the print report for read_f, t2 and t1 can
> actually be the same exact timestamp, and tdiv will try to divide by 0.0.
>
> Normally this is not a problem as this is defined to be INFINITY in C99
> Annex F.
>
> Clang, however, has
On 02/02/2016 02:23 PM, Programmingkid wrote:
>> And why isn't bsd_path usable for that purpose?
>
> After trying it out, I found out why bsd_path isn't usable for that purpose.
> It is because the user might try to use a flash drive as the the cdrom. Say a
> flash drive is set to
On 02/02/16 21:03, John Snow wrote:
> Recently, qemu iotest 013 has started to fail for me:
>
> Fedora release 22 (Twenty Two)
>
> 3.5.0-9.fc22
> clang version 3.5.0 (tags/RELEASE_350/final)
> Target: x86_64-redhat-linux-gnu
> Thread model: posix
>
>
> +4
On 02/02/2016 22:59, Eric Blake wrote:
> I'd be okay with this patch, if you want to make it a formal
> submission, and if no one else chimes in with any opinion other
> than disgust at clang's shenanigans.
I'm not okay with the patch. What's wrong with
-fno-sanitize=float-divide-by-zero? GCC
On 02/02/2016 04:47 PM, Laszlo Ersek wrote:
> On 02/02/16 21:03, John Snow wrote:
>> Recently, qemu iotest 013 has started to fail for me:
>>
>> Fedora release 22 (Twenty Two)
>>
>> 3.5.0-9.fc22
>> clang version 3.5.0 (tags/RELEASE_350/final)
>> Target: x86_64-redhat-linux-gnu
>> Thread model:
On 02/02/16 23:00, John Snow wrote:
>
>
> On 02/02/2016 04:47 PM, Laszlo Ersek wrote:
>> On 02/02/16 21:03, John Snow wrote:
>>> Recently, qemu iotest 013 has started to fail for me:
>>>
>>> Fedora release 22 (Twenty Two)
>>>
>>> 3.5.0-9.fc22
>>> clang version 3.5.0 (tags/RELEASE_350/final)
>>>
Am 03.02.2016 um 00:38 schrieb Eric Blake:
> On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
>> The QMP monitor code has two helper methods object_add
>> and qmp_object_del that are called from several places
>> in the code (QMP, HMP and main emulator startup).
>>
>> The HMP and main emulator
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
> The QMP monitor code has two helper methods object_add
> and qmp_object_del that are called from several places
> in the code (QMP, HMP and main emulator startup).
>
> The HMP and main emulator startup code also share
> further logic that
On 02/02/2016 04:41 PM, Andreas Färber wrote:
> Am 03.02.2016 um 00:38 schrieb Eric Blake:
>> On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
>>> The QMP monitor code has two helper methods object_add
>>> and qmp_object_del that are called from several places
>>> in the code (QMP, HMP and main
On Tue, 02/02 18:20, Max Reitz wrote:
> On 13.01.2016 03:50, Fam Zheng wrote:
> > The "pnum < nb_sectors" condition in deciding whether to actually copy
> > data is unnecessarily strict, and the qiov initialization is
> > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard.
> >
> >
The "pnum < nb_sectors" condition in deciding whether to actually copy
data is unnecessarily strict, and the qiov initialization is
unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard.
Rewrite mirror_iteration to fix both flaws.
The output of iotests 109 is updated because we now report
The three lines are duplicated a number of times now, refactor a
function.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
block/mirror.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/block/mirror.c
v11: Rebase. The only difference is the "file" parameter of
bdrv_get_block_status_above.
Patch 1 rewrites mirror_iteration. Patch 2 is a small DRY cleaning up.
The main benefit is copying unallocated sectors (both zeroed and discarded)
doesn't go through the iov setup loop, as they don't
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
> Allow creation of user creatable object types with qemu-img
> via a new --object command line arg. This will be used to supply
> passwords and/or encryption keys to the various block driver
> backends via the recently added 'secret' object type.
On Feb 2, 2016, at 12:31 PM, Daniel P. Berrange wrote:
> On Tue, Feb 02, 2016 at 12:28:24PM -0500, Programmingkid wrote:
>>
>> On Feb 2, 2016, at 12:16 PM, Daniel P. Berrange wrote:
>>
>>> On Tue, Feb 02, 2016 at 12:08:31PM -0500, Programmingkid wrote:
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-17-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
tests/qemu-iotests/059 | 10 ++
On Feb 2, 2016, at 2:24 PM, Eric Blake wrote:
> On 02/02/2016 12:10 PM, Programmingkid wrote:
>
>>> There was/is no leak because it qdict_get_str() returns 'const char *' and
>>> so nothing needs freeing. So your change is still a backwards steps IMHO.
>>
>> char filename[MAXPATHLEN];
>>
On Feb 2, 2016, at 9:30 PM, Eric Blake wrote:
> On 02/02/2016 06:15 PM, Programmingkid wrote:
>
>>> No, keep filename as a const char * pointer. It's easy to avoid use of
>>> uninitialized memory. Try this:
>>>
>>> const char *filename;
>>> char bsd_path[MAXPATHLEN] = "";
>>> ...
>>> if
On 02/02/2016 09:21 PM, Programmingkid wrote:
>>> #if defined(__APPLE__) && defined(__MACH__)
>>>/* if a physical device experienced an error while being opened */
>>>if (strncmp((*bsd_path ? bsd_path : filename), "/dev/", 5) == 0) {
>>>
On Wed, Jan 27, 2016 at 02:26:53PM +0100, Kevin Wolf wrote:
> Am 26.01.2016 um 14:34 hat Daniel P. Berrange geschrieben:
> > Allow creation of user creatable object types with qemu-img
> > via a new --object command line arg. This will be used to supply
> > passwords and/or encryption keys to the
On Wed, Jan 27, 2016 at 03:26:51PM +0100, Kevin Wolf wrote:
> Am 26.01.2016 um 14:34 hat Daniel P. Berrange geschrieben:
> > -if ((argc - optind) == 1) {
> > +if (imageOpts) {
> > +char *file;
> > +qopts = qemu_opts_parse_noisily(_opts, argv[optind], false);
> > +if
This function should support URLs of the "nbd://" format (without
swallowing the export name), and for "nbd:///" URLs it should replace
"?socket=$TEST_DIR" by "?socket=TEST_DIR" because putting the Unix
socket files into the test directory makes sense.
Signed-off-by: Max Reitz
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-5-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
block/raw-posix.c | 1 +
block/raw_bsd.c | 1 +
2 files
From: Fam Zheng
The added parameter can be used to return the BDS pointer which the
valid offset is referring to. Its value should be ignored unless
BDRV_BLOCK_OFFSET_VALID in ret is set.
Until block drivers fill in the right value, let's clear it explicitly
right before
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-4-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff
Trying to connect to a nonexistent NBD export should not crash the
server.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/143 | 73 ++
Suggested-by: Paolo Bonzini
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/141 | 186 +
tests/qemu-iotests/141.out |
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-8-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/qed.c |
From: Fam Zheng
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-13-git-send-email-f...@redhat.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
block/vmdk.c | 4 ++--
1 file changed, 2 insertions(+), 2
From: Fam Zheng
Now all drivers should return a correct "file", we can make use of it,
even with the recursion into backing chain above.
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
From: Jeff Cody
This fixes a regression introduced with commit 3f09bfbc7. Multiple
bugs arise in conjunction with live snapshots and mirroring operations
(which include active layer commit).
After a live snapshot occurs, the active layer and the base layer both
have a
From: Jeff Cody
Signed-off-by: Jeff Cody
Message-id:
2dbc05efba2f683cb3aaf71aaa9b776ebf7ec57c.1454376655.git.jc...@redhat.com
Reviewed-by: Max Reitz
[Moved test number from 143 to 144]
Signed-off-by: Max Reitz
---
From: Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero";
"bs" is replaced with "filename" string.
Refactor the merge conditions in img_map() into entry_mergeable().
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
bdrv_delete() is not very happy about deleting BlockDriverStates with
dirty bitmaps still attached to them. In the past, we got around that
very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and
bdrv_close() simply ignoring that condition. We should fix that by
releasing all named
From: Fam Zheng
Unused since 94db6d2d3.
Signed-off-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Kevin Wolf
Signed-off-by: Max Reitz
---
blockjob.c | 8
1 file changed, 8
When bdrv_close_all() is called, instead of force-closing all root
BlockDriverStates, it is better to just drop the reference from all
BlockBackends and let them be closed automatically. This prevents BDS
from getting closed that are still referenced by other BDS, which may
result in loss of
As a side effect, we can now make x-blockdev-del's check whether a BDS
is actually owned by the monitor explicit.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
blockdev.c | 28 +++-
This adds a test for having multiple BlockBackends in one BDS tree. In
this case, there is one BB for the protocol BDS and one BB for the
format BDS in a simple two-BDS tree (with the protocol BDS and BB added
first).
When bdrv_close_all() is executed, no cached data from any BDS should be
lost;
From: Fam Zheng
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-7-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
The NBD code uses the BDS close notifier to determine when a medium is
ejected. However, now it should use the BB's BDS removal notifier for
that instead of the BDS's close notifier.
Signed-off-by: Max Reitz
Reviewed-by: Fam Zheng
Reviewed-by: Kevin Wolf
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-10-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/vdi.c | 1 +
1 file changed, 1 insertion(+)
diff
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-9-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/sheepdog.c | 3 +++
1 file changed, 3 insertions(+)
From: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Message-id: 1453780743-16806-11-git-send-email-f...@redhat.com
Signed-off-by: Max Reitz
---
block/vpc.c | 2 ++
1 file changed, 2 insertions(+)
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Reviewed-by: Fam Zheng
Signed-off-by: Kevin Wolf
---
blockdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index
Paolo Bonzini writes:
> On 02/02/2016 22:59, Eric Blake wrote:
>> I'd be okay with this patch, if you want to make it a formal
>> submission, and if no one else chimes in with any opinion other
>> than disgust at clang's shenanigans.
>
> I'm not okay with the patch. What's
On Feb 2, 2016, at 5:04 PM, Eric Blake wrote:
> On 02/02/2016 02:23 PM, Programmingkid wrote:
>
>>> And why isn't bsd_path usable for that purpose?
>>
>> After trying it out, I found out why bsd_path isn't usable for that purpose.
>> It is because the user might try to use a flash drive as
On 02/02/2016 06:15 PM, Programmingkid wrote:
>> No, keep filename as a const char * pointer. It's easy to avoid use of
>> uninitialized memory. Try this:
>>
>> const char *filename;
>> char bsd_path[MAXPATHLEN] = "";
>> ...
>> if (strncmp("/dev/cdrom"...) {
>>bsd_path = ...
>> }
>> ...
>>
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
> Allow creation of user creatable object types with qemu-nbd
> via a new --object command line arg. This will be used to supply
> passwords and/or encryption keys to the various block driver
> backends via the recently added 'secret' object type.
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote:
> Allow creation of user creatable object types with qemu-io
> via a new --object command line arg. This will be used to supply
> passwords and/or encryption keys to the various block driver
> backends via the recently added 'secret' object type.
>
When declaring the 'struct option' array, use the standard
constants no_argument/required_argument, instead of magic
values 0 and 1.
Reviewed-by: Eric Blake
Signed-off-by: Daniel P. Berrange
---
qemu-nbd.c | 47
Currently qemu-img allows an image filename to be passed on the
command line, but unless using the JSON format, it does not have
a way to set any options except the format eg
qemu-img info https://127.0.0.1/images/centos7.iso
This adds a --image-opts arg that indicates that the positional
Currently qemu-io allows an image filename to be passed on the
command line, but unless using the JSON format, it does not have
a way to set any options except the format eg
qemu-io https://127.0.0.1/images/centos7.iso
qemu-io /home/berrange/demo.qcow2
This adds a --image-opts arg that
Allow creation of user creatable object types with qemu-img
via a new --object command line arg. This will be used to supply
passwords and/or encryption keys to the various block driver
backends via the recently added 'secret' object type.
# printf letmein > mypasswd.txt
# qemu-img info
60 matches
Mail list logo