Spotted by Coverity.
Cc: Paolo Bonzini
Signed-off-by: Gerd Hoffmann
Message-id: 1463737748-1062-1-git-send-email-kra...@redhat.com
---
ui/gtk.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 7572cec..01b8216 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@
g (2016-06-02 14:26:57 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-ui-20160603-1
for you to fetch changes up to c5ce83334465ee5acb6789a2f22d125273761c9e:
vnc: add configurable keyboard delay (2016-06-03 08:2
From: Alexander Graf
Our current VNC code does not handle color maps (aka non-true-color) at all
and aborts if a client requests them. There are 2 major issues with this:
1) A VNC viewer on an 8-bit X11 system may request color maps
2) RealVNC _always_ starts requesting color maps, then moves
Signed-off-by: Gerd Hoffmann
Tested-by: Cole Robinson
Message-id: 1464790116-32405-1-git-send-email-kra...@redhat.com
---
ui/sdl2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 909038f..30d2a3c 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -794,6 +794,9 @@ void
From: Pavel Dovgalyuk
This patch adds support of b8g8r8x8 pixel format for SDL2.
Signed-off-by: Pavel Dovgalyuk
Message-id: 20160517072848.4540.34695.stgit@PASHA-ISP
Signed-off-by: Gerd Hoffmann
---
ui/sdl2-2d.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.
From: Cole Robinson
Signed-off-by: Cole Robinson
Reviewed-by: Eric Blake
Reviewed-by: Marc-André Lureau
Message-id:
c880920f6e40a506394d89dbbe1f67c63d359c17.1463588606.git.crobi...@redhat.com
Signed-off-by: Gerd Hoffmann
---
ui/egl-helpers.c | 27 ++-
1 file changed,
On Fri, Jun 03, 2016 at 11:19:43AM +0530, Bharata B Rao wrote:
> Let the alignment b/n RAM and memory hotplug region be equal to
> LMB size (256MB) so that there is no gap b/n RAM and hotplug region.
> This new alignment is true for only pseries-2.7 onwards and the older
> machine types continue to
Limits the rate kbd events from the vnc server are forwarded to the
guest, so input devices which are typically low-bandwidth can keep
up even on bulky input.
v2: update documentation too.
v3: spell fixes.
Signed-off-by: Gerd Hoffmann
Tested-by: Yang Hongyang
Message-id: 1464762150-25817-1-git-
On Thu, Jun 02, 2016 at 09:47:01AM +0100, Mark Cave-Ayland wrote:
> On 02/06/16 09:23, Cédric Le Goater wrote:
>
> > On 06/02/2016 09:45 AM, Mark Cave-Ayland wrote:
> >> On 02/06/16 08:37, Cédric Le Goater wrote:
> >>> On 06/02/2016 05:17 AM, David Gibson wrote:
> On Wed, Jun 01, 2016 at 08:0
From: Cole Robinson
The user explicitly requested spice GL, so if we know it isn't
going to work we should exit
Signed-off-by: Cole Robinson
Reviewed-by: Marc-André Lureau
Message-id:
e3789e35b16f9e3cc6f2652f91c52d88ba6d6936.1463588606.git.crobi...@redhat.com
Signed-off-by: Gerd Hoffmann
---
On Fri, Jun 03, 2016 at 11:19:42AM +0530, Bharata B Rao wrote:
> Signed-off-by: Bharata B Rao
Applied to ppc-for-2.7, we were always going to need this at some point.
> ---
> hw/ppc/spapr.c | 22 --
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/
On Wed, 05/25 15:52, Max Reitz wrote:
> On 17.05.2016 09:35, Fam Zheng wrote:
> > The cases is about live snapshot features. Disable image locking because
> > otherwise a few tests are going to fail because we reuse the same images
> > at blockdev-add.
> >
> > Signed-off-by: Fam Zheng
> > ---
> >
On Fri, Jun 03, 2016 at 11:19:44AM +0530, Bharata B Rao wrote:
> Memory hotplug can fail for some combinations of RAM and maxmem when
> DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends
> on maximum addressable memory returned by guest and this value is currently
> being calc
On Wed, Jun 01, 2016 at 06:57:40PM +1000, Alexey Kardashevskiy wrote:
> There are going to be multiple IOMMUs per a container. This moves
> the single host IOMMU parameter set to a list of VFIOHostDMAWindow.
>
> This should cause no behavioral change and will be used later by
> the SPAPR TCE IOMMU
On Thu, Jun 02, 2016 at 18:31:04 +0200, Igor Mammedov wrote:
> On Thu, 2 Jun 2016 17:05:06 +0200
> Peter Krempa wrote:
> > On Thu, Jun 02, 2016 at 11:53:22 -0300, Eduardo Habkost wrote:
> > > On Thu, Jun 02, 2016 at 02:22:22PM +0200, Igor Mammedov wrote:
[...]
> > I couldn't find anything regard
Commit "ca58b45 ui/virtio-gpu: add and use qemu_create_displaysurface_pixman"
breaks scanouts which use a region of the underlying resource only.
So, we need another way to handle the underlying issue. Lets create a
new pixman image, grab a reference on the pixman providing the
underlying storage
#x27; into
staging (2016-06-02 14:26:57 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-vga-20160603-1
for you to fetch changes up to 8d0cc96d0dc18931494437ffa68655c0e11dc8fe:
virtio-gpu: add live migration support (2016-06-03 09:0
Make sure all fifo ptrs are within range.
Fixes: CVE-2016-4454
Cc: P J P
Reported-by: 李强
Signed-off-by: Gerd Hoffmann
Message-id: 1464592161-18348-3-git-send-email-kra...@redhat.com
---
hw/display/vmware_vga.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/display/v
vmsvga_fifo_run is called in regular intervals (on each display update)
and will resume where it left off. So we can simply exit the loop,
without having to worry about how processing will continue.
Fixes: CVE-2016-4453
Cc: P J P
Reported-by: 李强
Signed-off-by: Gerd Hoffmann
Message-id: 1464592
The fifo is normal ram. So kvm vcpu threads and qemu iothread can
access the fifo in parallel without syncronization. Which in turn
implies we can't use the fifo pointers in-place because the guest
can try changing them underneath us. So add shadows for them, to
make sure the guest can't modify
Reviewed-by: Eric Blake
Signed-off-by: Greg Kurz
---
v2: added Eric's r-b
---
hw/9pfs/9p.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 587e901f81cc..12bd688f37d3 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1646,15 +1646,15
The readdir_r() function has a broken design and should not be used anymore.
It is expected to be obsoleted in a future version of POSIX.1:
http://austingroupbugs.net/view.php?id=696#c2857
Glibc has already announced that 2.24 (scheduled for August 2016) will
deprecates readdir_r() and encourages
Store some additional state for cursor and resource backing storage,
so we can write out and reload things. Implement vmsave+vmload for
2d mode. Continue blocking live migration in 3d/virgl mode.
Signed-off-by: Gerd Hoffmann
Message-id: 1464009727-7753-1-git-send-email-kra...@redhat.com
---
hw
If we are to switch back to readdir(), we need a more complex type than
DIR * to be able to serialize concurrent accesses to the directory stream.
This patch introduces a placeholder type and fixes all users.
Reviewed-by: Eric Blake
Signed-off-by: Greg Kurz
---
v2: added Eric's r-b
---
hw/9pfs
Sanity checks are applied when the fifo is enabled by the guest
(SVGA_REG_CONFIG_DONE write). Which doesn't help much if the guest
changes the fifo registers afterwards. Move the checks to
vmsvga_fifo_length so they are done each time qemu is about to read
from the fifo.
Fixes: CVE-2016-4454
Cc:
If several threads concurrently call readdir() with the same directory
stream pointer, it is possible that they all get a pointer to the same
dirent structure, whose content is overwritten each time readdir() is
called.
We must thus serialize accesses to the dirent structure.
This may be achieved
This patch changes the 9p code to use readdir() again instead of
readdir_r(), which is deprecated in glibc 2.24.
All the locking was put in place by a previous patch.
Signed-off-by: Greg Kurz
---
v2: set errno to 0 before calling readdir()
---
fsdev/file-op-9p.h |3 +--
hw/9pfs/9p-handle.c
On Wed, Jun 01, 2016 at 06:57:41PM +1000, Alexey Kardashevskiy wrote:
> New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management.
> This adds ability to VFIO common code to dynamically allocate/remove
> DMA windows in the host kernel when new VFIO container is added/removed.
>
> Thi
I just noticed that somebody submitted a related patch recently:
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg02702.html
Could you please check whether this fixes your issue here with
sdl2-2d.c, too?
--
You received this bug notification because you are a member of qemu-
devel-ml, w
Eric Blake writes:
> We have several places that want to go from qapi to JSON; right now,
> they have to create an intermediate QObject to do the work. That
> also has the drawback that the JSON formatting of a QDict will
> rearrange keys (according to a deterministic, but unpredictable,
> hash)
configure --enable-colo/--disable-colo to switch COLO
support on/off.
COLO support is On by default.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Signed-off-by: Gonglei
Reviewed-by: Dr. David Alan Gilbert
---
v11:
- Turn COLO on in default (Eric's suggestion)
---
configure | 11
This new communication path will be used for returning messages
from destination to source.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v13:
- Remove useless error report
v12:
- Add Reviewed-by tag
v11:
- Rebase master to use qemu_file_get_retu
Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state
after the first live migration successfully finished.
We reuse migration thread, so if colo is enabled by user, migration thread will
go into the process of colo.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Signed
We add helper function colo_supported() to indicate whether
colo is supported or not, with which we use to control whether or not
showing 'x-colo' string to users, they can use qmp command
'query-migrate-capabilities' or hmp command 'info migrate_capabilities'
to learn if colo is supported.
Cc: Ju
This is the 17th version of COLO FT feature.
Here is only COLO frame part, you can get the whole codes from github:
https://github.com/coloft/qemu/commits/colo-v3.0-periodic-mode
Migration now switches to use the new QIOChannel API. It only affects COLO's
patch 9 and patch 12, which we used the o
The main process of the checkpoint is to synchronize SVM with PVM.
VM's state includes ram and device state. So we will migrate PVM's
state to SVM when do checkpoint, just like migration does.
We will cache PVM's state in slave, we use QEMUSizedBuffer
to store the data, we need to know the size of
For COLO's checkpoint process, we will do savevm/loadvm repeatedly.
So every time we call qemu_loadvm_section_start_full(), we will
add all sections information into loadvm_handlers list for one time.
There will be many instances in loadvm_handlers for one section,
and this will lead to memory leak
During the time of VM's running, PVM may dirty some pages, we will transfer
PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint
time. So, the content of SVM's RAM cache will always be same with PVM's memory
after checkpoint.
Instead of flushing all content of PVM's RAM
We need communications protocol of user-defined to control the checkpoint
process.
The new checkpoint request is started by Primary VM, and the interactive process
like below:
Checkpoint synchronizing points:
Primary Secondary
If some errors happen during VM's COLO FT stage, it's important to
notify the users of this event. Together with 'x_colo_lost_heartbeat',
Users can intervene in COLO's failover work immediately.
If users don't want to get involved in COLO's failover verdict,
it is still necessary to notify users th
Do checkpoint periodically, the default interval is 200ms.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v12:
- Add Reviewed-by tag
v11:
- Fix wrong sleep time for checkpoint period. (Dave's comment)
---
migration/colo.c | 12
1 fil
We should not load PVM's state directly into SVM, because there maybe some
errors happen when SVM is receving data, which will break SVM.
We need to ensure receving all data before load the state into SVM. We use
an extra memory to cache these data (PVM's ram). The ram cache in secondary side
is i
Guest will enter this state when paused to save/restore VM state
under colo checkpoint.
Cc: Eric Blake
Cc: Markus Armbruster
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Signed-off-by: Gonglei
Reviewed-by: Dr. David Alan Gilbert
Reviewed-by: Eric Blake
---
qapi-schema.json | 5 ++
We should not destroy the state of SVM (Secondary VM) until we receive the whole
state from the PVM (Primary VM), in case the primary fails in the middle of
sending
the state, so, here we cache the device state in Secondary before restore it.
Besides, we should call qemu_system_reset() before loa
For COLO periodic mode, it needs to buffer packets that
sent by VM, and we will not release these packets until
finish a checkpoint.
Here, we add each netdev a buffer-filter that will be controlled
by COLO. It is off by default, and the packets will not pass
through these filters. If users don't e
We record the address of the dirty pages that received,
it will help flushing pages that cached into SVM.
We record them by re-using migration dirty bitmap.
Signed-off-by: zhanghailiang
Reviewed-by: Dr. David Alan Gilbert
---
v16:
- Use the new wrapper memory_region_get_ram_addr() modified in co
We add a new helper functions qemu_savevm_live_state(),
and make qemu_save_device_state() public.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v15:
- Add Reviewd-by tag
v14:
- New patch split from previous
'COLO: Separate the process of saving/
Add checkpoint-delay parameter for migrate-set-parameters, so that
we can control the checkpoint frequency when COLO is in periodic mode.
Cc: Luiz Capitulino
Cc: Eric Blake
Cc: Markus Armbruster
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v1
Eric Blake writes:
> Similar to pretty printing in the QObject visitor. The trickiest
> part is probably that the testsuite now has to honor parameterization
> on whether pretty printing is enabled.
Worth mentioning that the pretty-printing matches the one in
qobject-json.c?
>
> Signed-off-by:
For PVM, if there is failover request from users.
The COLO thread will exit the loop while the failover BH does the
cleanup work and resumes VM.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v13:
- Add Reviewed-by tag
v12:
- Fix error report and
If the net connection between COLO's two sides is broken while COLO or
COLO incoming thread is blocked in read()/write() socket fd.
It will not detect this error until connection is timeout.
That will be a long time.
Here we shutdown all the related socket file descriptors to wake up the
blocking
We separate the process of saving/loading ram and device state when do
checkpoint. We add new helpers for save/load ram/device. With this change,
we can directly transfer RAM from primary side to secondary side without
using channel-buffer as assistant, which also reduce the size of extra memory
wa
We should not do failover work while the main thread is loading
VM's state. Otherwise it will destroy the consistent of VM's memory and
device state.
Here we add a new failover status 'RELAUNCH' which means we should
relaunch the process of failover.
Signed-off-by: zhanghailiang
Signed-off-by: L
We can know if VM in destination should go into COLO mode by refer to
the info that been migrated from PVM.
We skip this section if colo is not enabled (i.e.
migrate_set_capability colo off), so that, It not break compatibility with
migration
however the --enable-colo/disable-colo on the source/d
We can register some callback for this notifier,
this will be used by COLO to register a callback which
will add each netdev a buffer filter.
Signed-off-by: zhanghailiang
Cc: Jason Wang
Cc: Yang Hongyang
---
v17:
- Rename netdev_init_add_notifier() to netdev_register_init_notifier()
v16:
- Simp
If users require SVM to takeover work, colo incoming thread should
exit from loop while failover BH helps backing to migration incoming
coroutine.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v12:
- Improve error message that suggested by Dave
-
It is unnecessary to call qemu_savevm_state_begin() in every checkpoint process.
It mainly sets up devices and does the first device state pass. These data will
not change during the later checkpoint process. So, we split it out of
colo_do_checkpoint_transaction(), in this way, we can reduce these
Switch from normal migration loadvm process into COLO checkpoint process if
COLO mode is enabled.
We add three new members to struct MigrationIncomingState,
'have_colo_incoming_thread'
and 'colo_incoming_thread' record the colo related threads for secondary VM,
'migration_incoming_co' records the
We leave users to choose whatever heartbeat solution they want, if the heartbeat
is lost, or other errors they detect, they can use experimental command
'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations
accordingly.
For example, if the command is sent to the PVM, the Pri
If we start qemu with -S, the runstate will change from 'prelaunch' to 'running'
after going into colo state.
So it is necessary to update the global runstate after going into colo state.
Signed-off-by: zhanghailiang
Signed-off-by: Li Zhijian
Reviewed-by: Dr. David Alan Gilbert
---
v13:
- Add R
Am 03.06.2016 um 04:07 hat Fam Zheng geschrieben:
> This is sometimes a useful value we should count in.
>
> Signed-off-by: Fam Zheng
Thanks, applied to the block branch.
Kevin
We may want to accept zero interval when VM FT solutions like MC
or COLO use this filter to release packets on demand.
Signed-off-by: zhanghailiang
Reviewed-by: Yang Hongyang
Cc: Jason Wang
Cc: Yang Hongyang
---
net/filter-buffer.c | 10 --
1 file changed, 10 deletions(-)
diff --git
When handling failover, we do different things according to the different stage
of failover process, here we introduce a global atomic variable to record the
status of failover.
We add four failover status to indicate the different stage of failover process.
You should use the helpers to get and s
Enable all buffer filters that added by COLO while
go into COLO process, and disable them while exit COLO.
Signed-off-by: zhanghailiang
Cc: Jason Wang
Cc: Yang Hongyang
---
v16:
- Stop buffer filter while doing checkpoint and resume it after
checkpoint.
v15:
- Re-implement colo_set_filter_sta
On Thu, 2 Jun 2016 00:56:47 -0700
Neo Jia wrote:
> On Wed, Jun 01, 2016 at 04:40:19PM +0800, Dong Jia wrote:
> > On Wed, 25 May 2016 01:28:17 +0530
> > Kirti Wankhede wrote:
> >
> > > +
> > > +/*
> > > + * Pin a set of guest PFNs and return their associated host PFNs for API
> > > + * supported
If VM is in COLO FT state, we should do some extra work before normal shutdown
process. SVM will ignore the shutdown command if this command is issued directly
to it. PVM will send the shutdown command to SVM if it gets this command.
Cc: Paolo Bonzini
Signed-off-by: zhanghailiang
Signed-off-by:
There are several stages during loadvm process. In different stage,
migration incoming processes different section.
We want to control these stages more accuracy, to optimize the COLO
capability.
Here we add two new helper functions: qemu_loadvm_state_begin()
and qemu_load_device_state().
Besides,
On Thu, Jun 02, 2016 at 09:27:45PM +0200, Sascha Silbe wrote:
> Dear Daniel,
>
> "Daniel P. Berrange" writes:
>
> > On Thu, Jun 02, 2016 at 09:41:56AM +0200, Michal Privoznik wrote:
> >> On 01.06.2016 18:16, Wei Xu wrote:
> >> > On 2016年06月01日 00:44, Daniel P. Berrange wrote:
> > There are plent
Make sure master start block replication after slave's block
replication started.
Signed-off-by: zhanghailiang
Signed-off-by: Wen Congyang
Signed-off-by: Li Zhijian
Cc: Stefan Hajnoczi
Cc: Kevin Wolf
Cc: Max Reitz
---
migration/colo.c | 49 ++
Hi Markus,
Thanks very much for your thorough review for the whole series, really
really impressed:)
On 06/01/2016 08:37 PM, Markus Armbruster wrote:
Cao jin writes:
msi_init() reports errors with error_report(), which is wrong
when it's used in realize().
msix_init() has the same proble
On 03/06/16 16:40, Markus Armbruster wrote:
> Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set
> cannot_instantiate_with_device_add_yet without also adding a comment
> explaining why. It is currently the only one lacking such a comment.
> Let's fix that.
>
> Unfortunately, the commit
Le 03/06/2016 à 10:32, Riku Voipio a écrit :
> On Thu, Jun 02, 2016 at 10:14:15PM +0200, Laurent Vivier wrote:
>> Some IFLA_* symbols can be missing in the host linux/if_link.h,
>> but as they are enums and not "#defines", check in "configure" if
>> last known (IFLA_PROTO_DOWN) is available and
Eric Blake writes:
> Now that we can visit any QObject, it's easy to add support
> for visit_type_any() in the JSON output visitor.
>
> Signed-off-by: Eric Blake
Unlike in v3, this actually clones the QObject behind the any type.
Much cleaner, and very little code due to your elegant use of vis
Eric Blake writes:
> Rather than open-code two different JSON visitors, it's nicer to
> make qobject_to_json() reuse the JSON output visitor. This also
> lets us pass QObject to any output visitor (passing it to the
> string output visitor will fail if structs are involved, but
> passing it to t
On Fri, Jun 03, 2016 at 02:07:00AM +0800, Wei Xu wrote:
> On 2016年06月02日 19:38, Michal Privoznik wrote:
> > On 02.06.2016 10:29, Daniel P. Berrange wrote:
> > > On Thu, Jun 02, 2016 at 09:41:56AM +0200, Michal Privoznik wrote:
> > > > On 01.06.2016 18:16, Wei Xu wrote:
> > > > > On 2016年06月01日 00:4
Eric Blake writes:
> On 05/19/2016 10:52 AM, Eric Blake wrote:
>> Let the caller decide whether output must be strict JSON (and
>> raise an error on an attempt to output an encoding error or
>> non-finite number), vs. the status quo of relaxed (encoding
>> errors are rewritten to use substitute U
v6: Rebase, and address comments from Max and Rich:
Dropped the gluster implementation because the previous reviewed version
doesn't handle reopen correctly. Left for another day.
Added Max's reviewed-by in patches 1, 3, 7, 12, 13, 16, 17 and 20 - 22.
Updated "qemu -help" text. [
As a very special case, in sync=none mode, the source is the backing image of
the target, which will be RO opened again. This won't work with image locking
because the first open could be exclusive.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
blockdev.c | 5 +
1 file changed, 5 inse
On Thu, Jun 02, 2016 at 10:14:15PM +0200, Laurent Vivier wrote:
> Some IFLA_* symbols can be missing in the host linux/if_link.h,
> but as they are enums and not "#defines", check in "configure" if
> last known (IFLA_PROTO_DOWN) is available and if not, disable
> management of NETLINK_ROUTE protoc
> From: Dong Jia [mailto:bjsdj...@linux.vnet.ibm.com]
> Sent: Friday, June 03, 2016 4:32 PM
>
> On Thu, 2 Jun 2016 00:56:47 -0700
> Neo Jia wrote:
>
> > On Wed, Jun 01, 2016 at 04:40:19PM +0800, Dong Jia wrote:
> > > On Wed, 25 May 2016 01:28:17 +0530
> > > Kirti Wankhede wrote:
> > >
> > > > +
To allow overriding the default locking behavior when opening the image.
Signed-off-by: Fam Zheng
---
qapi/block-core.json | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 98a20d2..23ec31d 100644
--- a/qapi/
If dtc or pixman submodule is initialized, "git archive" in the subshell
gets a relative filename against $(SRC_PATH), while we have already
cd'ed into the submodule directory.
Prefix it with $(CURDIR), which is the full path to the working
directory.
Signed-off-by: Fam Zheng
---
tests/docker/M
The VM is running, qemu-io would fail the lock acquisition.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
tests/qemu-iotests/030 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 3ac2443..fa996ef 100755
--- a/tests/qe
Am 02.06.2016 um 17:58 hat Denis V. Lunev geschrieben:
> The problem with excessive flushing was found by a couple of performance
> tests:
> - parallel directory tree creation (from 2 processes)
> - 32 cached writes + fsync at the end in a loop
>
> For the first one results improved from 2.6 l
Respect the locking mode from CLI or QMP, and set the open flags
accordingly.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
blockdev.c | 23 +++
qemu-options.hx | 1 +
2 files changed, 24 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 717785e..5acb286
We should wait for the QEMU process to terminate and close the image
before we check the data.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
tests/qemu-iotests/091 | 3 +++
tests/qemu-iotests/091.out | 1 +
2 files changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/091 b/tests/
Block drivers can implement this new operation .bdrv_lockf to actually lock the
image in the protocol specific way.
Signed-off-by: Fam Zheng
---
block.c | 57 +++
include/block/block.h | 11 -
include/block/block_int.h |
Signed-off-by: Fam Zheng
---
qemu-io.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/qemu-io.c b/qemu-io.c
index d977a6e..7a5e824 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -107,6 +107,7 @@ static void open_help(void)
" -r, -- open file read-only\n"
Later the block layer will automatically lock the images to avoid unexpected
concurrent accesses to the same image, which will easily corrupt the metadata
or user data, unless in some very special cases, like migration.
The exceptional cases like shared storage migration and testing should
set BDR
With image locking, opening /dev/null can fail when multiple tests run
in parallel (make -j2, for example). Use null-co:// as the null protocol
doesn't do image locking.
While it's arguable we could special-case /dev/null, /dev/zero,
/dev/urandom etc in raw-posix driver, it is not really necessary
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
qemu-nbd.c| 7 ++-
qemu-nbd.texi | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 6554f0a..6adfc46 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -98,6 +98,7 @@ static void usage(const cha
This takes care of both the CLOEXEC flag and fd-path mapping for image
locking.
Signed-off-by: Fam Zheng
---
include/qemu/osdep.h | 3 +++
util/osdep.c | 9 +
2 files changed, 12 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 749214a..89c63c7 100644
They are wrappers of POSIX fcntl "file private locking".
Signed-off-by: Fam Zheng
---
include/qemu/osdep.h | 2 ++
util/osdep.c | 29 +
2 files changed, 31 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 6937694..749214a 100644
-
Eric Blake writes:
> On 06/02/2016 09:02 AM, Markus Armbruster wrote:
>> Eric Blake writes:
>>
>>> Pull out a new qstring_append_json_number() helper, so that all
>>> JSON output producers can use a consistent style for printing
>>> floating point without duplicating code (since we are doing mo
If specified, BDRV_O_NO_LOCK flag will be set when opening the image.
Signed-off-by: Fam Zheng
---
qemu-img.c | 91 +-
1 file changed, 72 insertions(+), 19 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 4b56ad3..88a12b5 100644
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
---
block/raw-posix.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index a4f5a1b..bb8669f 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -645,15 +645,7 @@ static int
virtlockd in libvirt locks the first byte, we lock byte 1 to avoid
the intervene.
Both file and host device protocols are covered.
The complication is with reopen. We have three different locking states,
namely "unlocked", "shared locked" and "exclusively locked".
There have three different stat
Signed-off-by: Fam Zheng
---
qemu-img-cmds.hx | 44 ++--
qemu-img.c | 1 +
qemu-img.texi| 3 +++
3 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
index e7cded6..fa87942 100644
--- a/qemu-img-cm
This patch changes usb-host behavior in case we hostbus= and hostaddr=
properties are used to identify the usb device in question. Instead of
adding the device to the hotplug watchlist we try to open directly using
the given bus number and device address.
Putting a device specified by hostaddr to
In sync=none the backing image of s->target is s->common.bs, which could
be exclusively locked, the image locking wouldn't work here.
Later we can update completion code to lock it after the replaced node
has dropped its lock.
Signed-off-by: Fam Zheng
---
blockdev.c | 10 --
1 file chan
1 - 100 of 301 matches
Mail list logo