mbox

[PULL,00/14] Block layer patches

Message ID 20240119181327.236745-1-kwolf@redhat.com (mailing list archive)
State New, archived
Headers show

Pull-request

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

Message

Kevin Wolf Jan. 19, 2024, 6:13 p.m. UTC
The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc:

  Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +0000)

are available in the Git repository at:

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

for you to fetch changes up to ced0d71c5270bed828ed2bd4b116ddfb12862bf9:

  block/blklogwrites: Protect mutable driver state with a mutex. (2024-01-19 18:45:44 +0100)

----------------------------------------------------------------
Block layer patches

- virtio-blk: Multiqueue fixes and cleanups
- blklogwrites: Fixes for write_zeroes and superblock update races
- commit/stream: Allow users to request only format driver names in
  backing file format
- monitor: only run coroutine commands in qemu_aio_context

----------------------------------------------------------------
Ari Sundholm (2):
      block/blklogwrites: Fix a bug when logging "write zeroes" operations.
      block/blklogwrites: Protect mutable driver state with a mutex.

Kevin Wolf (1):
      string-output-visitor: Fix (pseudo) struct handling

Peter Krempa (2):
      commit: Allow users to request only format driver names in backing file format
      stream: Allow users to request only format driver names in backing file format

Stefan Hajnoczi (9):
      iotests: add filter_qmp_generated_node_ids()
      iotests: port 141 to Python for reliable QMP testing
      monitor: only run coroutine commands in qemu_aio_context
      virtio-blk: move dataplane code into virtio-blk.c
      virtio-blk: rename dataplane create/destroy functions
      virtio-blk: rename dataplane to ioeventfd
      virtio-blk: restart s->rq reqs in vq AioContexts
      virtio-blk: tolerate failure to set BlockBackend AioContext
      virtio-blk: always set ioeventfd during startup

 qapi/block-core.json                          |  17 +-
 hw/block/dataplane/trace.h                    |   1 -
 hw/block/dataplane/virtio-blk.h               |  34 ---
 include/block/block-global-state.h            |   3 +-
 include/block/block_int-common.h              |   4 +-
 include/block/block_int-global-state.h        |   6 +
 include/hw/virtio/virtio-blk.h                |  16 +-
 block.c                                       |  37 ++-
 block/blklogwrites.c                          | 120 ++++++--
 block/commit.c                                |   6 +-
 block/monitor/block-hmp-cmds.c                |   2 +-
 block/stream.c                                |  10 +-
 blockdev.c                                    |  13 +
 hw/block/dataplane/virtio-blk.c               | 404 -------------------------
 hw/block/virtio-blk.c                         | 412 ++++++++++++++++++++++++--
 monitor/qmp.c                                 |  17 --
 qapi/qmp-dispatch.c                           |  24 +-
 qapi/string-output-visitor.c                  |  46 +++
 tests/unit/test-bdrv-drain.c                  |   3 +-
 tests/qemu-iotests/iotests.py                 |   7 +
 hw/block/dataplane/meson.build                |   1 -
 hw/block/dataplane/trace-events               |   5 -
 meson.build                                   |   1 -
 tests/qemu-iotests/060.out                    |   4 +-
 tests/qemu-iotests/071.out                    |   4 +-
 tests/qemu-iotests/081.out                    |  16 +-
 tests/qemu-iotests/087.out                    |  12 +-
 tests/qemu-iotests/108.out                    |   2 +-
 tests/qemu-iotests/109                        |   4 +-
 tests/qemu-iotests/109.out                    |  78 +++--
 tests/qemu-iotests/117.out                    |   2 +-
 tests/qemu-iotests/120.out                    |   2 +-
 tests/qemu-iotests/127.out                    |   2 +-
 tests/qemu-iotests/140.out                    |   2 +-
 tests/qemu-iotests/141                        | 307 ++++++++-----------
 tests/qemu-iotests/141.out                    | 200 +++----------
 tests/qemu-iotests/143.out                    |   2 +-
 tests/qemu-iotests/156.out                    |   2 +-
 tests/qemu-iotests/176.out                    |  16 +-
 tests/qemu-iotests/182.out                    |   2 +-
 tests/qemu-iotests/183.out                    |   4 +-
 tests/qemu-iotests/184.out                    |  32 +-
 tests/qemu-iotests/185                        |   6 +-
 tests/qemu-iotests/185.out                    |  45 ++-
 tests/qemu-iotests/191.out                    |  16 +-
 tests/qemu-iotests/195.out                    |  16 +-
 tests/qemu-iotests/223.out                    |  12 +-
 tests/qemu-iotests/227.out                    |  32 +-
 tests/qemu-iotests/247.out                    |   2 +-
 tests/qemu-iotests/273.out                    |   8 +-
 tests/qemu-iotests/308                        |   4 +-
 tests/qemu-iotests/308.out                    |   4 +-
 tests/qemu-iotests/tests/file-io-error        |   5 +-
 tests/qemu-iotests/tests/iothreads-resize.out |   2 +-
 tests/qemu-iotests/tests/qsd-jobs.out         |   4 +-
 55 files changed, 1014 insertions(+), 1024 deletions(-)
 delete mode 100644 hw/block/dataplane/trace.h
 delete mode 100644 hw/block/dataplane/virtio-blk.h
 delete mode 100644 hw/block/dataplane/virtio-blk.c
 delete mode 100644 hw/block/dataplane/trace-events

Comments

Peter Maydell Jan. 20, 2024, 5:21 p.m. UTC | #1
On Fri, 19 Jan 2024 at 18:15, Kevin Wolf <kwolf@redhat.com> wrote:
>
> The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc:
>
>   Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +0000)
>
> are available in the Git repository at:
>
>   https://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to ced0d71c5270bed828ed2bd4b116ddfb12862bf9:
>
>   block/blklogwrites: Protect mutable driver state with a mutex. (2024-01-19 18:45:44 +0100)
>
> ----------------------------------------------------------------
> Block layer patches
>
> - virtio-blk: Multiqueue fixes and cleanups
> - blklogwrites: Fixes for write_zeroes and superblock update races
> - commit/stream: Allow users to request only format driver names in
>   backing file format
> - monitor: only run coroutine commands in qemu_aio_context
>
> ----------------------------------------------------------------

Got some compile failures on this one; looks like the compiler
on our s390 box didn't like this:

https://gitlab.com/qemu-project/qemu/-/jobs/5973441293
https://gitlab.com/qemu-project/qemu/-/jobs/5973441291
https://gitlab.com/qemu-project/qemu/-/jobs/5973441330

In file included from ../include/qemu/host-utils.h:33,
from ../include/qemu/bitops.h:16,
from ../include/qemu/timer.h:4,
from ../include/block/aio.h:24,
from ../include/block/aio-wait.h:28,
from ../include/block/block-io.h:27,
from ../block/blklogwrites.c:15:
../block/blklogwrites.c: In function ‘blk_log_writes_co_do_log’:
../include/qemu/bswap.h:148:36: error: left shift count >= width of
type [-Werror=shift-count-overflow]
148 | ((((_x) & 0x00000000000000ffU) << 56) | \
| ^~
../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
409 | .nr_entries = const_le64(0),
| ^~~~~~~~~~
../include/qemu/bswap.h:149:36: error: left shift count >= width of
type [-Werror=shift-count-overflow]
149 | (((_x) & 0x000000000000ff00U) << 40) | \
| ^~
../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
409 | .nr_entries = const_le64(0),
| ^~~~~~~~~~
cc1: all warnings being treated as errors

thanks
-- PMM
Kevin Wolf Jan. 22, 2024, 11:14 a.m. UTC | #2
Am 20.01.2024 um 18:21 hat Peter Maydell geschrieben:
> On Fri, 19 Jan 2024 at 18:15, Kevin Wolf <kwolf@redhat.com> wrote:
> >
> > The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc:
> >
> >   Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +0000)
> >
> > are available in the Git repository at:
> >
> >   https://repo.or.cz/qemu/kevin.git tags/for-upstream
> >
> > for you to fetch changes up to ced0d71c5270bed828ed2bd4b116ddfb12862bf9:
> >
> >   block/blklogwrites: Protect mutable driver state with a mutex. (2024-01-19 18:45:44 +0100)
> >
> > ----------------------------------------------------------------
> > Block layer patches
> >
> > - virtio-blk: Multiqueue fixes and cleanups
> > - blklogwrites: Fixes for write_zeroes and superblock update races
> > - commit/stream: Allow users to request only format driver names in
> >   backing file format
> > - monitor: only run coroutine commands in qemu_aio_context
> >
> > ----------------------------------------------------------------
> 
> Got some compile failures on this one; looks like the compiler
> on our s390 box didn't like this:
> 
> https://gitlab.com/qemu-project/qemu/-/jobs/5973441293
> https://gitlab.com/qemu-project/qemu/-/jobs/5973441291
> https://gitlab.com/qemu-project/qemu/-/jobs/5973441330
> 
> In file included from ../include/qemu/host-utils.h:33,
> from ../include/qemu/bitops.h:16,
> from ../include/qemu/timer.h:4,
> from ../include/block/aio.h:24,
> from ../include/block/aio-wait.h:28,
> from ../include/block/block-io.h:27,
> from ../block/blklogwrites.c:15:
> ../block/blklogwrites.c: In function ‘blk_log_writes_co_do_log’:
> ../include/qemu/bswap.h:148:36: error: left shift count >= width of
> type [-Werror=shift-count-overflow]
> 148 | ((((_x) & 0x00000000000000ffU) << 56) | \
> | ^~
> ../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
> 409 | .nr_entries = const_le64(0),
> | ^~~~~~~~~~
> ../include/qemu/bswap.h:149:36: error: left shift count >= width of
> type [-Werror=shift-count-overflow]
> 149 | (((_x) & 0x000000000000ff00U) << 40) | \
> | ^~
> ../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
> 409 | .nr_entries = const_le64(0),
> | ^~~~~~~~~~
> cc1: all warnings being treated as errors

Looks like const_le64() introduced in commit 845d80a8 is buggy. I wonder
why we even added it when there is no user of it (this blklogwrites one
is the first one, so it exposes the error).

Of course, 0 is just as good as const_le64(0), so I'll just change it to
that for now. But I suppose const_le64() should either be fixed (and
used by something) or removed.

Kevin
Peter Maydell Jan. 22, 2024, 11:44 a.m. UTC | #3
On Mon, 22 Jan 2024 at 11:15, Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 20.01.2024 um 18:21 hat Peter Maydell geschrieben:
> > Got some compile failures on this one; looks like the compiler
> > on our s390 box didn't like this:
> >
> > https://gitlab.com/qemu-project/qemu/-/jobs/5973441293
> > https://gitlab.com/qemu-project/qemu/-/jobs/5973441291
> > https://gitlab.com/qemu-project/qemu/-/jobs/5973441330
> >
> > In file included from ../include/qemu/host-utils.h:33,
> > from ../include/qemu/bitops.h:16,
> > from ../include/qemu/timer.h:4,
> > from ../include/block/aio.h:24,
> > from ../include/block/aio-wait.h:28,
> > from ../include/block/block-io.h:27,
> > from ../block/blklogwrites.c:15:
> > ../block/blklogwrites.c: In function ‘blk_log_writes_co_do_log’:
> > ../include/qemu/bswap.h:148:36: error: left shift count >= width of
> > type [-Werror=shift-count-overflow]
> > 148 | ((((_x) & 0x00000000000000ffU) << 56) | \
> > | ^~
> > ../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
> > 409 | .nr_entries = const_le64(0),
> > | ^~~~~~~~~~
> > ../include/qemu/bswap.h:149:36: error: left shift count >= width of
> > type [-Werror=shift-count-overflow]
> > 149 | (((_x) & 0x000000000000ff00U) << 40) | \
> > | ^~
> > ../block/blklogwrites.c:409:27: note: in expansion of macro ‘const_le64’
> > 409 | .nr_entries = const_le64(0),
> > | ^~~~~~~~~~
> > cc1: all warnings being treated as errors
>
> Looks like const_le64() introduced in commit 845d80a8 is buggy. I wonder
> why we even added it when there is no user of it (this blklogwrites one
> is the first one, so it exposes the error).
>
> Of course, 0 is just as good as const_le64(0), so I'll just change it to
> that for now. But I suppose const_le64() should either be fixed (and
> used by something) or removed.

Using ULL as the suffix on the constants in the macro should
be sufficient to fix the problem, I suspect.

-- PMM