From: Kevin Wolf <kwolf@redhat.com>
To: Ari Sundholm <ari@tuxera.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
qemu-stable@nongnu.org, Emil Karlson <jkarlson@tuxera.com>,
Hanna Reitz <hreitz@redhat.com>,
Akihiko Odaki <akihiko.odaki@gmail.com>
Subject: Re: [PATCH v2] block/file-posix: Fix return value translation for AIO discards.
Date: Tue, 19 Oct 2021 14:02:21 +0200 [thread overview]
Message-ID: <YW6zzSKnm26+8ZXS@redhat.com> (raw)
In-Reply-To: <20211019110954.4170931-1-ari@tuxera.com>
Am 19.10.2021 um 13:09 hat Ari Sundholm geschrieben:
> AIO discards regressed as a result of the following commit:
> 0dfc7af2 block/file-posix: Optimize for macOS
>
> When trying to run blkdiscard within a Linux guest, the request would
> fail, with some errors in dmesg:
>
> ---- [ snip ] ----
> [ 4.010070] sd 2:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> [ 4.011061] sd 2:0:0:0: [sda] tag#0 Sense Key : Aborted Command
> [current]
> [ 4.011061] sd 2:0:0:0: [sda] tag#0 Add. Sense: I/O process
> terminated
> [ 4.011061] sd 2:0:0:0: [sda] tag#0 CDB: Unmap/Read sub-channel 42
> 00 00 00 00 00 00 00 18 00
> [ 4.011061] blk_update_request: I/O error, dev sda, sector 0
> ---- [ snip ] ----
>
> This turns out to be a result of a flaw in changes to the error value
> translation logic in handle_aiocb_discard(). The default return value
> may be left untranslated in some configurations, and the wrong variable
> is used in one translation.
>
> Fix both issues.
>
> Signed-off-by: Ari Sundholm <ari@tuxera.com>
> Signed-off-by: Emil Karlson <jkarlson@tuxera.com>
> Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
>
> Cc: qemu-stable@nongnu.org
> Fixes: 0dfc7af2b28 ("block/file-posix: Optimize for macOS")
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2021-10-19 12:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 18:07 [PATCH] block/file-posix: Fix return value translation for AIO discards Ari Sundholm
2021-10-19 2:57 ` Akihiko Odaki
2021-10-19 3:40 ` Philippe Mathieu-Daudé
2021-10-19 9:27 ` Stefan Hajnoczi
2021-10-19 11:09 ` [PATCH v2] " Ari Sundholm
2021-10-19 12:02 ` Kevin Wolf [this message]
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=YW6zzSKnm26+8ZXS@redhat.com \
--to=kwolf@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=ari@tuxera.com \
--cc=hreitz@redhat.com \
--cc=jkarlson@tuxera.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).