mbox

[PULL,v2,00/40] Block layer patches

Message ID 1447164580-31094-1-git-send-email-kwolf@redhat.com
State New
Headers show

Pull-request

git://repo.or.cz/qemu/kevin.git tags/for-upstream

Message

Kevin Wolf Nov. 10, 2015, 2:09 p.m. UTC
The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +0000)

are available in the git repository at:


  git://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to c400bddb916268394e352f82809eb4728424a5b1:

  Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-10' into queue-block (2015-11-10 14:59:26 +0100)

----------------------------------------------------------------

Block layer patches

----------------------------------------------------------------
Alberto Garcia (17):
      block: Don't call blk_bs() twice in bdrv_lookup_bs()
      block: check for existing device IDs in external_snapshot_prepare()
      block: rename BlockdevSnapshot to BlockdevSnapshotSync
      block: support passing 'backing': '' to 'blockdev-add'
      block: add a 'blockdev-snapshot' QMP command
      block: add tests for the 'blockdev-snapshot' command
      commit: reopen overlay_bs before base
      qemu-iotests: Test the reopening of overlay_bs in 'block-commit'
      throttle: Check for pending requests in throttle_group_unregister_bs()
      throttle: Use bs->throttle_state instead of bs->io_limits_enabled
      block: Disallow snapshots if the overlay doesn't support backing files
      block: Remove inner quotation marks in iotest 085
      block: test 'blockdev-snapshot' using a file BDS as the overlay
      mirror: block all operations on the target image during the job
      block: Add blk_get_refcnt()
      block: Add 'x-blockdev-del' QMP command
      iotests: Add tests for the x-blockdev-del command

Jeff Cody (2):
      qemu-iotests: fix cleanup of background processes
      qemu-iotests: fix -valgrind option for check

John Snow (5):
      qcow2: avoid misaligned 64bit bswap
      qemu-img: add check for zero-length job len
      qemu-io: fix cvtnum lval types
      qemu-io: Check for trailing chars
      qemu-io: Correct error messages

Kevin Wolf (2):
      qcow2: Fix qcow2_get_cluster_offset() for zero clusters
      Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-10' into queue-block

Max Reitz (15):
      block: Add blk_remove_bs()
      block: Make bdrv_states public
      block: Add functions for inheriting a BBRS
      blockdev: Add blockdev-open-tray
      blockdev: Add blockdev-close-tray
      blockdev: Add blockdev-remove-medium
      blockdev: Add blockdev-insert-medium
      blockdev: Implement eject with basic operations
      blockdev: Implement change with basic operations
      block: Inquire tray state before tray-moved events
      qmp: Introduce blockdev-change-medium
      hmp: Use blockdev-change-medium for change command
      blockdev: read-only-mode for blockdev-change-medium
      hmp: Add read-only-mode option to change command
      iotests: Add test for change-related QMP commands

 block.c                          |  22 +-
 block/block-backend.c            |  61 +++-
 block/commit.c                   |   8 +-
 block/mirror.c                   |   4 +
 block/qapi.c                     |   2 +-
 block/qcow2-cluster.c            |  15 +-
 block/qcow2-refcount.c           |  11 +-
 block/throttle-groups.c          |   7 +
 blockdev.c                       | 527 ++++++++++++++++++++--------
 hmp-commands.hx                  |  20 +-
 hmp.c                            |  47 ++-
 include/block/block_int.h        |   7 +-
 include/sysemu/block-backend.h   |   4 +
 include/sysemu/blockdev.h        |   2 -
 qapi-schema.json                 |  10 +-
 qapi/block-core.json             | 192 ++++++++++-
 qemu-img.c                       |   3 +-
 qemu-io-cmds.c                   | 185 +++++++---
 qmp-commands.hx                  | 317 ++++++++++++++++-
 qmp.c                            |   3 +-
 tests/qemu-iotests/039.out       |  30 +-
 tests/qemu-iotests/040           |  30 ++
 tests/qemu-iotests/040.out       |   4 +-
 tests/qemu-iotests/058           |  12 +-
 tests/qemu-iotests/061.out       |  12 +-
 tests/qemu-iotests/085           | 120 ++++++-
 tests/qemu-iotests/085.out       |  38 ++-
 tests/qemu-iotests/118           | 720 +++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/118.out       |   5 +
 tests/qemu-iotests/137.out       |   6 +-
 tests/qemu-iotests/139           | 414 ++++++++++++++++++++++
 tests/qemu-iotests/139.out       |   5 +
 tests/qemu-iotests/common        |   9 +-
 tests/qemu-iotests/common.config |  32 +-
 tests/qemu-iotests/common.qemu   |  18 +-
 tests/qemu-iotests/common.rc     |  18 +-
 tests/qemu-iotests/group         |   2 +
 ui/cocoa.m                       |  10 +-
 38 files changed, 2621 insertions(+), 311 deletions(-)
 create mode 100755 tests/qemu-iotests/118
 create mode 100644 tests/qemu-iotests/118.out
 create mode 100644 tests/qemu-iotests/139
 create mode 100644 tests/qemu-iotests/139.out

Comments

Peter Maydell Nov. 10, 2015, 5:10 p.m. UTC | #1
On 10 November 2015 at 14:09, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +0000)
>
> are available in the git repository at:
>
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to c400bddb916268394e352f82809eb4728424a5b1:
>
>   Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-10' into queue-block (2015-11-10 14:59:26 +0100)
>
> ----------------------------------------------------------------
>
> Block layer patches

Fails to build on OSX :-(

/Users/pm215/src/qemu-for-merges/ui/cocoa.m:1121:40: error: too few
arguments to function call, expected 7, have 5
                                   &err);
                                       ^
./qmp-commands.h:61:1: note: 'qmp_blockdev_change_medium' declared here
void qmp_blockdev_change_medium(const char *device, const char
*filename, bool has_format, const char *format, bool
has_read_only_mode, BlockdevChangeReadOnlyMode read_only_mode, Error
**errp);
^
1 error generated.

Also some warnings:

/Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:772:56: warning:
format specifies type 'size_t' (aka 'unsigned long') but the argument
has type 'unsigned long lo
ng' [-Wformat]
        printf("length cannot exceed %zu, given %s\n", SIZE_MAX, argv[optind]);
                                     ~~~               ^~~~~~~~
                                     %llu
/usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX'
#define SIZE_MAX          UINT64_MAX
                          ^~~~~~~~~~
/usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX        18446744073709551615ULL
                          ^~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:1082:56: warning:
format specifies type 'size_t' (aka 'unsigned long') but the argument
has type 'unsigned long l
ong' [-Wformat]
        printf("length cannot exceed %zu, given %s\n", SIZE_MAX, argv[optind]);
                                     ~~~               ^~~~~~~~
                                     %llu
/usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX'
#define SIZE_MAX          UINT64_MAX
                          ^~~~~~~~~~
/usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX'
#define UINT64_MAX        18446744073709551615ULL
                          ^~~~~~~~~~~~~~~~~~~~~~~

thanks
-- PMM
Kevin Wolf Nov. 11, 2015, 3:35 p.m. UTC | #2
Am 10.11.2015 um 18:10 hat Peter Maydell geschrieben:
> On 10 November 2015 at 14:09, Kevin Wolf <kwolf@redhat.com> wrote:
> > The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10' into staging (2015-11-10 09:39:24 +0000)
> >
> > are available in the git repository at:
> >
> >
> >   git://repo.or.cz/qemu/kevin.git tags/for-upstream
> >
> > for you to fetch changes up to c400bddb916268394e352f82809eb4728424a5b1:
> >
> >   Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-10' into queue-block (2015-11-10 14:59:26 +0100)
> >
> > ----------------------------------------------------------------
> >
> > Block layer patches
> 
> Fails to build on OSX :-(
> 
> /Users/pm215/src/qemu-for-merges/ui/cocoa.m:1121:40: error: too few
> arguments to function call, expected 7, have 5
>                                    &err);
>                                        ^
> ./qmp-commands.h:61:1: note: 'qmp_blockdev_change_medium' declared here
> void qmp_blockdev_change_medium(const char *device, const char
> *filename, bool has_format, const char *format, bool
> has_read_only_mode, BlockdevChangeReadOnlyMode read_only_mode, Error
> **errp);
> ^
> 1 error generated.
> 
> Also some warnings:
> 
> /Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:772:56: warning:
> format specifies type 'size_t' (aka 'unsigned long') but the argument
> has type 'unsigned long lo
> ng' [-Wformat]
>         printf("length cannot exceed %zu, given %s\n", SIZE_MAX, argv[optind]);
>                                      ~~~               ^~~~~~~~
>                                      %llu
> /usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX'
> #define SIZE_MAX          UINT64_MAX
>                           ^~~~~~~~~~
> /usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX'
> #define UINT64_MAX        18446744073709551615ULL
>                           ^~~~~~~~~~~~~~~~~~~~~~~

Isn't that actually a bug in the system headers? If I understand the
spec correctly, SIZE_MAX should be size_t. ("this expression shall have
the same type as would an expression that is an object of the
corresponding type converted according to the integer promotions.")

Anyway, I'll squash in a workaround that explicitly casts to uint64_t.

Kevin
Eric Blake Nov. 11, 2015, 4:38 p.m. UTC | #3
On 11/11/2015 08:35 AM, Kevin Wolf wrote:

>> Also some warnings:
>>
>> /Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:772:56: warning:
>> format specifies type 'size_t' (aka 'unsigned long') but the argument
>> has type 'unsigned long lo
>> ng' [-Wformat]
>>         printf("length cannot exceed %zu, given %s\n", SIZE_MAX, argv[optind]);
>>                                      ~~~               ^~~~~~~~
>>                                      %llu
>> /usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX'
>> #define SIZE_MAX          UINT64_MAX
>>                           ^~~~~~~~~~
>> /usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX'
>> #define UINT64_MAX        18446744073709551615ULL
>>                           ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Isn't that actually a bug in the system headers? If I understand the
> spec correctly, SIZE_MAX should be size_t. ("this expression shall have
> the same type as would an expression that is an object of the
> corresponding type converted according to the integer promotions.")

You are correct; the system headers are buggy.