Commit 4c55b1d0 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2017-04-24' into staging



Error reporting patches for 2017-04-24

# gpg: Signature made Mon 24 Apr 2017 08:16:34 BST
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2017-04-24:
  error: Apply error_propagate_null.cocci again
  qga: Make errp the last parameter of qga_vss_fsfreeze
  migration: Make errp the last parameter of local functions
  scsi: Make errp the last parameter of virtio_scsi_common_realize
  fdc: Make errp the last parameter of fdctrl_connect_drives
  nfs: Make errp the last parameter of nfs_client_open
  block: Make errp the last parameter of commit_active_start
  mirror: Make errp the last parameter of mirror_start_job
  crypto: Make errp the last parameter of functions
  block: Make errp the last parameter of bdrv_img_create
  socket: Make errp the last parameter of vsock_connect_saddr
  socket: Make errp the last parameter of unix_connect_saddr
  socket: Make errp the last parameter of inet_connect_saddr
  socket: Make errp the last parameter of socket_connect
  util/error: Fix leak in error_vprepend()

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 9eb2575e 021c9d25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4161,8 +4161,8 @@ bool bdrv_op_blocker_is_empty(BlockDriverState *bs)

void bdrv_img_create(const char *filename, const char *fmt,
                     const char *base_filename, const char *base_fmt,
                     char *options, uint64_t img_size, int flags,
                     Error **errp, bool quiet)
                     char *options, uint64_t img_size, int flags, bool quiet,
                     Error **errp)
{
    QemuOptsList *create_opts = NULL;
    QemuOpts *opts = NULL;
+6 −6
Original line number Diff line number Diff line
@@ -56,11 +56,11 @@ static int block_crypto_probe_generic(QCryptoBlockFormat format,


static ssize_t block_crypto_read_func(QCryptoBlock *block,
                                      void *opaque,
                                      size_t offset,
                                      uint8_t *buf,
                                      size_t buflen,
                                      Error **errp,
                                      void *opaque)
                                      Error **errp)
{
    BlockDriverState *bs = opaque;
    ssize_t ret;
@@ -83,11 +83,11 @@ struct BlockCryptoCreateData {


static ssize_t block_crypto_write_func(QCryptoBlock *block,
                                       void *opaque,
                                       size_t offset,
                                       const uint8_t *buf,
                                       size_t buflen,
                                       Error **errp,
                                       void *opaque)
                                       Error **errp)
{
    struct BlockCryptoCreateData *data = opaque;
    ssize_t ret;
@@ -102,9 +102,9 @@ static ssize_t block_crypto_write_func(QCryptoBlock *block,


static ssize_t block_crypto_init_func(QCryptoBlock *block,
                                      void *opaque,
                                      size_t headerlen,
                                      Error **errp,
                                      void *opaque)
                                      Error **errp)
{
    struct BlockCryptoCreateData *data = opaque;
    int ret;
+9 −8
Original line number Diff line number Diff line
@@ -1112,10 +1112,11 @@ static void mirror_start_job(const char *job_id, BlockDriverState *bs,
                             BlockdevOnError on_target_error,
                             bool unmap,
                             BlockCompletionFunc *cb,
                             void *opaque, Error **errp,
                             void *opaque,
                             const BlockJobDriver *driver,
                             bool is_none_mode, BlockDriverState *base,
                             bool auto_complete, const char *filter_node_name)
                             bool auto_complete, const char *filter_node_name,
                             Error **errp)
{
    MirrorBlockJob *s;
    BlockDriverState *mirror_top_bs;
@@ -1280,17 +1281,17 @@ void mirror_start(const char *job_id, BlockDriverState *bs,
    base = mode == MIRROR_SYNC_MODE_TOP ? backing_bs(bs) : NULL;
    mirror_start_job(job_id, bs, BLOCK_JOB_DEFAULT, target, replaces,
                     speed, granularity, buf_size, backing_mode,
                     on_source_error, on_target_error, unmap, NULL, NULL, errp,
                     on_source_error, on_target_error, unmap, NULL, NULL,
                     &mirror_job_driver, is_none_mode, base, false,
                     filter_node_name);
                     filter_node_name, errp);
}

void commit_active_start(const char *job_id, BlockDriverState *bs,
                         BlockDriverState *base, int creation_flags,
                         int64_t speed, BlockdevOnError on_error,
                         const char *filter_node_name,
                         BlockCompletionFunc *cb, void *opaque, Error **errp,
                         bool auto_complete)
                         BlockCompletionFunc *cb, void *opaque,
                         bool auto_complete, Error **errp)
{
    int orig_base_flags;
    Error *local_err = NULL;
@@ -1303,9 +1304,9 @@ void commit_active_start(const char *job_id, BlockDriverState *bs,

    mirror_start_job(job_id, bs, creation_flags, base, NULL, speed, 0, 0,
                     MIRROR_LEAVE_BACKING_CHAIN,
                     on_error, on_error, true, cb, opaque, &local_err,
                     on_error, on_error, true, cb, opaque,
                     &commit_active_job_driver, false, base, auto_complete,
                     filter_node_name);
                     filter_node_name, &local_err);
    if (local_err) {
        error_propagate(errp, local_err);
        goto error_restore_flags;
+3 −3
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ out:


static int64_t nfs_client_open(NFSClient *client, QDict *options,
                               int flags, Error **errp, int open_flags)
                               int flags, int open_flags, Error **errp)
{
    int ret = -EINVAL;
    QemuOpts *opts = NULL;
@@ -663,7 +663,7 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,

    ret = nfs_client_open(client, options,
                          (flags & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,
                          errp, bs->open_flags);
                          bs->open_flags, errp);
    if (ret < 0) {
        return ret;
    }
@@ -705,7 +705,7 @@ static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)
        goto out;
    }

    ret = nfs_client_open(client, options, O_CREAT, errp, 0);
    ret = nfs_client_open(client, options, O_CREAT, 0, errp);
    if (ret < 0) {
        goto out;
    }
+1 −1
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp)
        s->replication_state = BLOCK_REPLICATION_FAILOVER;
        commit_active_start(NULL, s->active_disk->bs, s->secondary_disk->bs,
                            BLOCK_JOB_INTERNAL, 0, BLOCKDEV_ON_ERROR_REPORT,
                            NULL, replication_done, bs, errp, true);
                            NULL, replication_done, bs, true, errp);
        break;
    default:
        aio_context_release(aio_context);
Loading