qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] aded65: qemu_file: use fwrite() correctly


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] aded65: qemu_file: use fwrite() correctly
Date: Wed, 26 Feb 2014 15:00:05 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: aded6539d983280212e08d09f14157b1cb4d58cc
      
https://github.com/qemu/qemu/commit/aded6539d983280212e08d09f14157b1cb4d58cc
  Author: Juan Quintela <address@hidden>
  Date:   2014-02-25 (Tue, 25 Feb 2014)

  Changed paths:
    M qemu-file.c

  Log Message:
  -----------
  qemu_file: use fwrite() correctly

fwrite() returns the number of items written.  But when there is one
error, it can return a short write.

In the particular bug that I was tracking, I did a migration to a
read-only filesystem.  And it was able to finish the migration
correctly.  fwrite() never returned a negative error code, nor zero,
always 4096. (migration writes chunks of about 14000 bytes).  And it
was able to "complete" the migration with success (yes, reading the
file was a bit more difficult).

To add insult to injury, if your amount of memory was big enough (12GB
on my case), it overwrote some important structure, and from them,
malloc failed.  This check makes the problem go away.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 24a370ef2351dc596a7e47508b952ddfba79ef94
      
https://github.com/qemu/qemu/commit/24a370ef2351dc596a7e47508b952ddfba79ef94
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2014-02-25 (Tue, 25 Feb 2014)

  Changed paths:
    M vmstate.c

  Log Message:
  -----------
  Fix vmstate_info_int32_le comparison/assign

Fix comparison of vmstate_info_int32_le so that it succeeds if loaded
value is (l)ess than or (e)qual

When the comparison succeeds, assign the value loaded
  This is a change in behaviour but I think the original intent, since
  the idea is to check if the version/size of the thing you're loading is
  less than some limit, but you might well want to do something based on
  the actual version/size in the file

Fix up comment and name text

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 6d3cb1f970ee85361618f7ff02869180394e012d
      
https://github.com/qemu/qemu/commit/6d3cb1f970ee85361618f7ff02869180394e012d
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2014-02-25 (Tue, 25 Feb 2014)

  Changed paths:
    M arch_init.c
    M include/migration/page_cache.h
    M page_cache.c

  Log Message:
  -----------
  Fix two XBZRLE corruption issues

Push zero'd pages into the XBZRLE cache
    A page that was cached by XBZRLE, zero'd and then XBZRLE'd again
    was being compared against a stale cache value

Don't use 'qemu_put_buffer_async' to put pages from the XBZRLE cache
    Since the cache might change before the data hits the wire

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 41310c68781d742fa9bbfd5fcb1df9b7f23f5759
      
https://github.com/qemu/qemu/commit/41310c68781d742fa9bbfd5fcb1df9b7f23f5759
  Author: Michael R. Hines <address@hidden>
  Date:   2014-02-25 (Tue, 25 Feb 2014)

  Changed paths:
    M docs/rdma.txt
    M migration-rdma.c
    M migration.c
    M qapi-schema.json

  Log Message:
  -----------
  rdma: rename 'x-rdma' => 'rdma'

As far as we can tell, all known bugs have been fixed:

1. Parallel migrations are working
2. IPv6 migration is working
3. virt-test is working

I'm not comfortable sending the revised libvirt patch
until this is accepted or review suggestions are addressed,
(including pin-all support. It does not make sense to
remove experimental for one thing and not the other. That's
too many trips through the libvirt community).

Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael R. Hines <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 6f6831f61a44fde832ee6fab0cc5632de34cf6b7
      
https://github.com/qemu/qemu/commit/6f6831f61a44fde832ee6fab0cc5632de34cf6b7
  Author: Peter Maydell <address@hidden>
  Date:   2014-02-26 (Wed, 26 Feb 2014)

  Changed paths:
    M arch_init.c
    M docs/rdma.txt
    M include/migration/page_cache.h
    M migration-rdma.c
    M migration.c
    M page_cache.c
    M qapi-schema.json
    M qemu-file.c
    M vmstate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140225' 
into staging

migration/next for 20140225

# gpg: Signature made Tue 25 Feb 2014 14:04:31 GMT using RSA key ID 5872D723
# gpg: Can't check signature: public key not found

* remotes/juanquintela/tags/migration/20140225:
  rdma: rename 'x-rdma' => 'rdma'
  Fix two XBZRLE corruption issues
  Fix vmstate_info_int32_le comparison/assign
  qemu_file: use fwrite() correctly

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/bc3fbad81696...6f6831f61a44

reply via email to

[Prev in Thread] Current Thread [Next in Thread]