qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 03/10] block: Make bdrv_{pread,pwrite}() return 0 on succe


From: Hanna Reitz
Subject: Re: [PATCH v5 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success
Date: Mon, 4 Jul 2022 13:48:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 09.06.22 17:27, Alberto Faria wrote:
They currently return the value of their 'bytes' parameter on success.

Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.

The few callers that rely on the previous behavior are adjusted
accordingly by hand.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
  block/cloop.c                    |  2 +-
  block/crypto.c                   |  4 ++--
  block/dmg.c                      | 10 +++++-----
  block/io.c                       | 10 ++--------
  block/qcow.c                     |  2 +-
  block/qcow2.c                    |  4 ++--
  block/qed.c                      |  7 +------
  block/vdi.c                      |  2 +-
  block/vmdk.c                     |  5 ++---
  tests/unit/test-block-iothread.c |  4 ++--
  10 files changed, 19 insertions(+), 31 deletions(-)

Reviewed-by: Hanna Reitz <hreitz@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]