* [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector()
@ 2015-11-24 12:17 Alberto Garcia
2015-11-24 12:18 ` [Qemu-devel] [PATCH for-2.5 2/2] atapi: Fix code indentation Alberto Garcia
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alberto Garcia @ 2015-11-24 12:17 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Peter Lieven, Stefan Hajnoczi, qemu-block, Alberto Garcia
Commit 5f81724d made PIO read requests async but didn't add the
relevant block_acct_failed() and block_acct_invalid() calls.
Signed-off-by: Alberto Garcia <berto@igalia.com>
---
hw/ide/atapi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 7b9f74c..5e3791c 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -148,17 +148,18 @@ static void cd_read_sector_cb(void *opaque, int ret)
{
IDEState *s = opaque;
- block_acct_done(blk_get_stats(s->blk), &s->acct);
-
#ifdef DEBUG_IDE_ATAPI
printf("cd_read_sector_cb: lba=%d ret=%d\n", s->lba, ret);
#endif
if (ret < 0) {
+ block_acct_failed(blk_get_stats(s->blk), &s->acct);
ide_atapi_io_error(s, ret);
return;
}
+ block_acct_done(blk_get_stats(s->blk), &s->acct);
+
if (s->cd_sector_size == 2352) {
cd_data_to_raw(s->io_buffer, s->lba);
}
@@ -173,6 +174,7 @@ static void cd_read_sector_cb(void *opaque, int ret)
static int cd_read_sector(IDEState *s)
{
if (s->cd_sector_size != 2048 && s->cd_sector_size != 2352) {
+ block_acct_invalid(blk_get_stats(s->blk), BLOCK_ACCT_READ);
return -EINVAL;
}
--
2.6.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH for-2.5 2/2] atapi: Fix code indentation
2015-11-24 12:17 [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Alberto Garcia
@ 2015-11-24 12:18 ` Alberto Garcia
2015-11-24 12:47 ` [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Kevin Wolf
2015-11-24 16:42 ` [Qemu-devel] " John Snow
2 siblings, 0 replies; 6+ messages in thread
From: Alberto Garcia @ 2015-11-24 12:18 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Peter Lieven, Stefan Hajnoczi, qemu-block, Alberto Garcia
This was accidentally changed by commit 5f81724d
Signed-off-by: Alberto Garcia <berto@igalia.com>
---
hw/ide/atapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 5e3791c..65f8dd4 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -443,7 +443,7 @@ eot:
if (ret < 0) {
block_acct_failed(blk_get_stats(s->blk), &s->acct);
} else {
- block_acct_done(blk_get_stats(s->blk), &s->acct);
+ block_acct_done(blk_get_stats(s->blk), &s->acct);
}
ide_set_inactive(s, false);
}
--
2.6.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector()
2015-11-24 12:17 [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Alberto Garcia
2015-11-24 12:18 ` [Qemu-devel] [PATCH for-2.5 2/2] atapi: Fix code indentation Alberto Garcia
@ 2015-11-24 12:47 ` Kevin Wolf
2015-11-24 12:52 ` Alberto Garcia
2015-11-24 16:42 ` [Qemu-devel] " John Snow
2 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2015-11-24 12:47 UTC (permalink / raw)
To: Alberto Garcia
Cc: jsnow, qemu-block, Peter Lieven, qemu-devel, Stefan Hajnoczi
Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
> Commit 5f81724d made PIO read requests async but didn't add the
> relevant block_acct_failed() and block_acct_invalid() calls.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
No cover letter? Also, adding CC to John.
Series: Reviewed-by: Kevin Wolf <kwolf@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector()
2015-11-24 12:47 ` [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Kevin Wolf
@ 2015-11-24 12:52 ` Alberto Garcia
2015-11-24 13:13 ` Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Alberto Garcia @ 2015-11-24 12:52 UTC (permalink / raw)
To: Kevin Wolf; +Cc: jsnow, qemu-block, Peter Lieven, qemu-devel, Stefan Hajnoczi
On Tue 24 Nov 2015 01:47:52 PM CET, Kevin Wolf <kwolf@redhat.com> wrote:
> Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
>> Commit 5f81724d made PIO read requests async but didn't add the
>> relevant block_acct_failed() and block_acct_invalid() calls.
>>
>> Signed-off-by: Alberto Garcia <berto@igalia.com>
>
> No cover letter? Also, adding CC to John.
I thought the patches were self-explanatory.
Berto
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector()
2015-11-24 12:52 ` Alberto Garcia
@ 2015-11-24 13:13 ` Kevin Wolf
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2015-11-24 13:13 UTC (permalink / raw)
To: Alberto Garcia
Cc: jsnow, qemu-block, Peter Lieven, qemu-devel, Stefan Hajnoczi
Am 24.11.2015 um 13:52 hat Alberto Garcia geschrieben:
> On Tue 24 Nov 2015 01:47:52 PM CET, Kevin Wolf <kwolf@redhat.com> wrote:
> > Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
> >> Commit 5f81724d made PIO read requests async but didn't add the
> >> relevant block_acct_failed() and block_acct_invalid() calls.
> >>
> >> Signed-off-by: Alberto Garcia <berto@igalia.com>
> >
> > No cover letter? Also, adding CC to John.
>
> I thought the patches were self-explanatory.
They are. But the cover letter isn't only useful for explaining the
series (you could have left this one without any comment in it), but
also as a starting point for replies to the series as a whole.
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector()
2015-11-24 12:17 [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Alberto Garcia
2015-11-24 12:18 ` [Qemu-devel] [PATCH for-2.5 2/2] atapi: Fix code indentation Alberto Garcia
2015-11-24 12:47 ` [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Kevin Wolf
@ 2015-11-24 16:42 ` John Snow
2 siblings, 0 replies; 6+ messages in thread
From: John Snow @ 2015-11-24 16:42 UTC (permalink / raw)
To: Alberto Garcia, qemu-devel; +Cc: Peter Lieven, Stefan Hajnoczi, qemu-block
On 11/24/2015 07:17 AM, Alberto Garcia wrote:
> Commit 5f81724d made PIO read requests async but didn't add the
> relevant block_acct_failed() and block_acct_invalid() calls.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> hw/ide/atapi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
> index 7b9f74c..5e3791c 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -148,17 +148,18 @@ static void cd_read_sector_cb(void *opaque, int ret)
> {
> IDEState *s = opaque;
>
> - block_acct_done(blk_get_stats(s->blk), &s->acct);
> -
> #ifdef DEBUG_IDE_ATAPI
> printf("cd_read_sector_cb: lba=%d ret=%d\n", s->lba, ret);
> #endif
>
> if (ret < 0) {
> + block_acct_failed(blk_get_stats(s->blk), &s->acct);
> ide_atapi_io_error(s, ret);
> return;
> }
>
> + block_acct_done(blk_get_stats(s->blk), &s->acct);
> +
> if (s->cd_sector_size == 2352) {
> cd_data_to_raw(s->io_buffer, s->lba);
> }
> @@ -173,6 +174,7 @@ static void cd_read_sector_cb(void *opaque, int ret)
> static int cd_read_sector(IDEState *s)
> {
> if (s->cd_sector_size != 2048 && s->cd_sector_size != 2352) {
> + block_acct_invalid(blk_get_stats(s->blk), BLOCK_ACCT_READ);
> return -EINVAL;
> }
>
>
Gah, sorry. I should have caught this during the merge. Thank you for
catching it.
Reviewed-by: John Snow <jsnow@redhat.com>
I'll send the PR.
--js
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-11-24 16:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 12:17 [Qemu-devel] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Alberto Garcia
2015-11-24 12:18 ` [Qemu-devel] [PATCH for-2.5 2/2] atapi: Fix code indentation Alberto Garcia
2015-11-24 12:47 ` [Qemu-devel] [Qemu-block] [PATCH for-2.5 1/2] atapi: Account for failed and invalid operations in cd_read_sector() Kevin Wolf
2015-11-24 12:52 ` Alberto Garcia
2015-11-24 13:13 ` Kevin Wolf
2015-11-24 16:42 ` [Qemu-devel] " John Snow
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.