All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2: Fix error handling in the compression code
Date: Tue, 30 Apr 2019 12:31:30 +0200	[thread overview]
Message-ID: <20190430103130.GC5607@linux.fritz.box> (raw)
In-Reply-To: <20190430100802.15368-1-berto@igalia.com>

Am 30.04.2019 um 12:08 hat Alberto Garcia geschrieben:
> This patch fixes a few things in the way error codes are handled in
> the qcow2 compression code:
> 
> a) qcow2_co_pwritev_compressed() expects qcow2_co_compress() to only
>    return -1 or -2 on failure, but this is not correct. Since the
>    change from qcow2_compress() to qcow2_co_compress() in commit
>    ceb029cd6feccf9f7607 the new code can also return -EINVAL (although
>    there does not seem to exist any code path that would cause that
>    error in the current implementation).
> 
> b) -1 and -2 are ad-hoc error codes defined in qcow2_compress().
>    This patch replaces them with standard constants from errno.h.
> 
> c) Both qcow2_compress() and qcow2_co_do_compress() return a negative
>    value on failure, but qcow2_co_pwritev_compressed() stores the
>    value in an unsigned data type.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>

Thanks, applied to the block branch.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2: Fix error handling in the compression code
Date: Tue, 30 Apr 2019 12:31:30 +0200	[thread overview]
Message-ID: <20190430103130.GC5607@linux.fritz.box> (raw)
Message-ID: <20190430103130.VkulHRAjRxmUqR_avPOEDSdRrfjfTRAOl5R7kge0fmk@z> (raw)
In-Reply-To: <20190430100802.15368-1-berto@igalia.com>

Am 30.04.2019 um 12:08 hat Alberto Garcia geschrieben:
> This patch fixes a few things in the way error codes are handled in
> the qcow2 compression code:
> 
> a) qcow2_co_pwritev_compressed() expects qcow2_co_compress() to only
>    return -1 or -2 on failure, but this is not correct. Since the
>    change from qcow2_compress() to qcow2_co_compress() in commit
>    ceb029cd6feccf9f7607 the new code can also return -EINVAL (although
>    there does not seem to exist any code path that would cause that
>    error in the current implementation).
> 
> b) -1 and -2 are ad-hoc error codes defined in qcow2_compress().
>    This patch replaces them with standard constants from errno.h.
> 
> c) Both qcow2_compress() and qcow2_co_do_compress() return a negative
>    value on failure, but qcow2_co_pwritev_compressed() stores the
>    value in an unsigned data type.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>

Thanks, applied to the block branch.

Kevin


  reply	other threads:[~2019-04-30 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 10:08 [Qemu-devel] [PATCH] qcow2: Fix error handling in the compression code Alberto Garcia
2019-04-30 10:08 ` Alberto Garcia
2019-04-30 10:31 ` Kevin Wolf [this message]
2019-04-30 10:31   ` Kevin Wolf
2019-05-02 11:13 ` no-reply
2019-05-02 11:13   ` no-reply

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=20190430103130.GC5607@linux.fritz.box \
    --to=kwolf@redhat.com \
    --cc=berto@igalia.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.