qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [RFC 0/3] block: Error parameter for opening/creating images
Date: Thu,  5 Sep 2013 10:10:17 +0200	[thread overview]
Message-ID: <1378368620-22682-1-git-send-email-mreitz@redhat.com> (raw)

This RFC adds an Error ** parameter to bdrv_open, bdrv_file_open,
bdrv_create and the respective functions provided by a block driver.

This results in more specific error information than just -errno provided
to the user when opening or creating images (disregarding the fact that
block drivers often already use error_report, which is generally changed
to error_setg through this patch).

The last patch in this series changes the qcow2 block driver to set an
example of usage in a block driver.

Note that several I/O tests break by applying this RFC since they expect
different error messages (generally, previously, an error message on
image opening/creation consisted of two lines; the first of which would be
generated by the driver through error_report, the second by the block
layer itself through strerror(-ret); this patch is designed to merge these
two lines into a single one). This applies to the tests 49, 51, 54 and 60.

Max Reitz (3):
  bdrv: Use "Error" for opening images
  block: Error parameter for opening functions
  qcow2: Use Error parameter

 block.c                   | 164 ++++++++++++++++++++++++++++++----------------
 block/blkdebug.c          |   5 +-
 block/blkverify.c         |   7 +-
 block/bochs.c             |   3 +-
 block/cloop.c             |   3 +-
 block/cow.c               |  10 +--
 block/dmg.c               |   3 +-
 block/mirror.c            |   5 +-
 block/nbd.c               |   3 +-
 block/parallels.c         |   3 +-
 block/qcow.c              |  10 +--
 block/qcow2.c             | 143 ++++++++++++++++++++++++++--------------
 block/qed.c               |  13 ++--
 block/raw-posix.c         |  18 +++--
 block/raw_bsd.c           |   8 ++-
 block/sheepdog.c          |  10 +--
 block/snapshot.c          |   2 +-
 block/vdi.c               |   6 +-
 block/vhdx.c              |   3 +-
 block/vmdk.c              |  11 ++--
 block/vpc.c               |   6 +-
 block/vvfat.c             |   7 +-
 blockdev.c                |  30 ++++-----
 include/block/block.h     |  11 ++--
 include/block/block_int.h |   9 ++-
 qemu-img.c                |  39 +++++------
 qemu-io.c                 |  14 ++--
 qemu-nbd.c                |   6 +-
 28 files changed, 343 insertions(+), 209 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2013-09-05  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05  8:10 Max Reitz [this message]
2013-09-05  8:10 ` [Qemu-devel] [RFC 1/3] bdrv: Use "Error" for opening images Max Reitz
2013-09-05  8:42   ` Kevin Wolf
2013-09-05  8:10 ` [Qemu-devel] [RFC 2/3] block: Error parameter for opening functions Max Reitz
2013-09-05  8:10 ` [Qemu-devel] [RFC 3/3] qcow2: Use Error parameter Max Reitz
2013-09-05 10:40 ` [Qemu-devel] [RFC 0/3] block: Error parameter for opening/creating images Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378368620-22682-1-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).