Skip to content

block: improve error reporting for unsupported O_DIRECT

Daniel P. Berrangé qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 10 repliesIn review
  2. v58 patches 7 repliesSuperseded
  3. v46 patches 13 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches10 repliesSuperseded
v23 patches4 repliesSuperseded
v13 patches3 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8monitor: simplify functions for getting a dup'd fdset entryinclude/monitor/monitor.h include/qemu/osdep.h monitor/misc.c +2 more+32 -572 replies
2/8util: split off a helper for dealing with O_CLOEXEC flagutil/osdep.c+15 -81 reply
3/8util: rename qemu_open() to qemu_open_old()accel/kvm/kvm-all.c backends/rng-random.c backends/tpm/tpm_passthrough.c +21 more+44 -421 reply
4/8util: refactor qemu_open_old to split off variadic args handlingutil/osdep.c+17 -71 reply
5/8util: add Error object for qemu_open_internal error reportingutil/osdep.c+13 -21 reply
6/8util: introduce qemu_open and qemu_create with error reportinginclude/qemu/osdep.h util/osdep.c+22 -01 reply
7/8util: give a specific error message when O_DIRECT doesn't workutil/osdep.c+14 -11 reply
8/8block/file: switch to use qemu_open/qemu_create for improved errorsblock/file-posix.c block/file-win32.c+9 -151 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchMarkus ArmbrusterEric BlakePhilippe Mathieu-DaudéRichard Henderson
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b R-b R-b
8/8R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/8] block: improve error reporting for unsupported O_DIRECT

v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00269.html
v2: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00589.html
v3: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg07098.html
v4: https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg05334.html
v5: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg00947.html

See patch commit messages for rationale

Ideally we would convert other callers of qemu_open_old to use qemu_open, and eventually remove qemu_open_old entirely, so every caller gets use of Error **errp.

Improved in v6:

- Fix errno regression dup'ing FD
- Move qapi header to correct patch
- Fix whitespace and commit messages
- Converted more use of qemu_open to qemu_open_old after rebase

Improved in v5:

- Drop reporting of flags in failed open call
- Split O_CLOEXEC handling off into separate helper
- Refactor monitor FD set APIs to simplify their use

Improved in v4:

- Use assert() for programmer mistakes
- Split second patch into three distinct parts
- Misc typos
- Improve commit message

Improved in v3:

- Re-arrange the patches series, so that the conversion to Error takes place first, then the improve O_DIRECT reporting
- Rename existing method to qemu_open_old
- Use a pair of new methods qemu_open + qemu_create to improve arg checking

Improved in v2:

- Mention that qemu_open_err is preferred over qemu_open
- Get rid of obsolete error_report call
- Simplify O_DIRECT handling
- Fixup iotests for changed error message text

Daniel P. Berrangé (8):
monitor: simplify functions for getting a dup'd fdset entry
util: split off a helper for dealing with O_CLOEXEC flag
util: rename qemu_open() to qemu_open_old()
util: refactor qemu_open_old to split off variadic args handling
util: add Error object for qemu_open_internal error reporting
util: introduce qemu_open and qemu_create with error reporting
util: give a specific error message when O_DIRECT doesn't work block/file: switch to use qemu_open/qemu_create for improved errors

 accel/kvm/kvm-all.c            |   2 +-
 backends/rng-random.c          |   2 +-
 backends/tpm/tpm_passthrough.c |   8 +--
 block/file-posix.c             |  16 ++---
 block/file-win32.c             |   5 +-
 block/vvfat.c                  |   5 +-
 chardev/char-fd.c              |   2 +-
 chardev/char-pipe.c            |   6 +-
 chardev/char.c                 |   2 +-
 dump/dump.c                    |   2 +-
 hw/s390x/s390-skeys.c          |   2 +-
 hw/usb/host-libusb.c           |   2 +-
 hw/usb/u2f-passthru.c          |   4 +-
 hw/vfio/common.c               |   4 +-
 include/monitor/monitor.h      |   3 +-
 include/qemu/osdep.h           |   9 ++-
 io/channel-file.c              |   2 +-
 monitor/misc.c                 |  58 ++++++++----------
 net/vhost-vdpa.c               |   2 +-
 os-posix.c                     |   2 +-
 qga/channel-posix.c            |   4 +-
 qga/commands-posix.c           |   6 +-
 stubs/fdset.c                  |   8 +--
 target/arm/kvm.c               |   2 +-
 ui/console.c                   |   2 +-
 util/osdep.c                   | 104 +++++++++++++++++++++++----------
 util/oslib-posix.c             |   2 +-
 27 files changed, 150 insertions(+), 116 deletions(-)
Signature · 1 line
2.26.2