[Qemu-devel] [PATCH 0/9] block: buffer-based io

Vladimir Sementsov-Ogievskiy posted 9 patches 4 years, 11 months ago
Test checkpatch passed
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190422145838.70903-1-vsementsov@virtuozzo.com
Maintainers: "Denis V. Lunev" <den@openvz.org>, John Snow <jsnow@redhat.com>, Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>
include/block/block_int.h      | 16 ++++++++++++++++
include/sysemu/block-backend.h | 19 +++++++++++++++++++
block/backup.c                 | 14 ++++++--------
block/commit.c                 |  5 ++---
block/parallels.c              | 14 ++++++--------
block/qcow.c                   | 19 ++++++-------------
block/qcow2.c                  |  9 ++-------
block/qed-table.c              | 12 +++++-------
block/qed.c                    |  6 ++----
block/stream.c                 |  4 +---
qemu-img.c                     | 13 ++++---------
11 files changed, 69 insertions(+), 62 deletions(-)
[Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Vladimir Sementsov-Ogievskiy 4 years, 11 months ago
Hi all!

We often need to do read/write with buffer, not qiov. Instead of
creating qiov in such cases, let's introduce corresponding helpers.

Vladimir Sementsov-Ogievskiy (9):
  block: introduce byte-based io helpers
  block/qcow2: use buffer-based io
  block/qcow: use buffer-based io
  block/qed: use buffer-based io
  block/parallels: use buffer-based io
  block/backup: use buffer-based io
  block/commit: use buffer-based io
  block/stream: use buffer-based io
  qemu-img: use buffer-based io

 include/block/block_int.h      | 16 ++++++++++++++++
 include/sysemu/block-backend.h | 19 +++++++++++++++++++
 block/backup.c                 | 14 ++++++--------
 block/commit.c                 |  5 ++---
 block/parallels.c              | 14 ++++++--------
 block/qcow.c                   | 19 ++++++-------------
 block/qcow2.c                  |  9 ++-------
 block/qed-table.c              | 12 +++++-------
 block/qed.c                    |  6 ++----
 block/stream.c                 |  4 +---
 qemu-img.c                     | 13 ++++---------
 11 files changed, 69 insertions(+), 62 deletions(-)

-- 
2.18.0


Re: [Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Stefan Hajnoczi 4 years, 11 months ago
On Mon, Apr 22, 2019 at 05:58:29PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> We often need to do read/write with buffer, not qiov. Instead of
> creating qiov in such cases, let's introduce corresponding helpers.
> 
> Vladimir Sementsov-Ogievskiy (9):
>   block: introduce byte-based io helpers
>   block/qcow2: use buffer-based io
>   block/qcow: use buffer-based io
>   block/qed: use buffer-based io
>   block/parallels: use buffer-based io
>   block/backup: use buffer-based io
>   block/commit: use buffer-based io
>   block/stream: use buffer-based io
>   qemu-img: use buffer-based io
> 
>  include/block/block_int.h      | 16 ++++++++++++++++
>  include/sysemu/block-backend.h | 19 +++++++++++++++++++
>  block/backup.c                 | 14 ++++++--------
>  block/commit.c                 |  5 ++---
>  block/parallels.c              | 14 ++++++--------
>  block/qcow.c                   | 19 ++++++-------------
>  block/qcow2.c                  |  9 ++-------
>  block/qed-table.c              | 12 +++++-------
>  block/qed.c                    |  6 ++----
>  block/stream.c                 |  4 +---
>  qemu-img.c                     | 13 ++++---------
>  11 files changed, 69 insertions(+), 62 deletions(-)
> 
> -- 
> 2.18.0
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Re: [Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Vladimir Sementsov-Ogievskiy 4 years, 11 months ago
23.04.2019 16:06, Stefan Hajnoczi wrote:
> On Mon, Apr 22, 2019 at 05:58:29PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> We often need to do read/write with buffer, not qiov. Instead of
>> creating qiov in such cases, let's introduce corresponding helpers.
>>
>> Vladimir Sementsov-Ogievskiy (9):
>>    block: introduce byte-based io helpers
>>    block/qcow2: use buffer-based io
>>    block/qcow: use buffer-based io
>>    block/qed: use buffer-based io
>>    block/parallels: use buffer-based io
>>    block/backup: use buffer-based io
>>    block/commit: use buffer-based io
>>    block/stream: use buffer-based io
>>    qemu-img: use buffer-based io
>>
>>   include/block/block_int.h      | 16 ++++++++++++++++
>>   include/sysemu/block-backend.h | 19 +++++++++++++++++++
>>   block/backup.c                 | 14 ++++++--------
>>   block/commit.c                 |  5 ++---
>>   block/parallels.c              | 14 ++++++--------
>>   block/qcow.c                   | 19 ++++++-------------
>>   block/qcow2.c                  |  9 ++-------
>>   block/qed-table.c              | 12 +++++-------
>>   block/qed.c                    |  6 ++----
>>   block/stream.c                 |  4 +---
>>   qemu-img.c                     | 13 ++++---------
>>   11 files changed, 69 insertions(+), 62 deletions(-)
>>
>> -- 
>> 2.18.0
>>
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

Thanks!

-- 
Best regards,
Vladimir

Re: [Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Stefano Garzarella 4 years, 11 months ago
On Mon, Apr 22, 2019 at 05:58:29PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> We often need to do read/write with buffer, not qiov. Instead of
> creating qiov in such cases, let's introduce corresponding helpers.
> 
> Vladimir Sementsov-Ogievskiy (9):
>   block: introduce byte-based io helpers
>   block/qcow2: use buffer-based io
>   block/qcow: use buffer-based io
>   block/qed: use buffer-based io
>   block/parallels: use buffer-based io
>   block/backup: use buffer-based io
>   block/commit: use buffer-based io
>   block/stream: use buffer-based io
>   qemu-img: use buffer-based io
> 
>  include/block/block_int.h      | 16 ++++++++++++++++
>  include/sysemu/block-backend.h | 19 +++++++++++++++++++
>  block/backup.c                 | 14 ++++++--------
>  block/commit.c                 |  5 ++---
>  block/parallels.c              | 14 ++++++--------
>  block/qcow.c                   | 19 ++++++-------------
>  block/qcow2.c                  |  9 ++-------
>  block/qed-table.c              | 12 +++++-------
>  block/qed.c                    |  6 ++----
>  block/stream.c                 |  4 +---
>  qemu-img.c                     | 13 ++++---------
>  11 files changed, 69 insertions(+), 62 deletions(-)
> 
> -- 
> 2.18.0
> 

The series LGTM and new helpers could be very useful!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano

Re: [Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Vladimir Sementsov-Ogievskiy 4 years, 11 months ago
30.04.2019 12:38, Stefano Garzarella wrote:
> On Mon, Apr 22, 2019 at 05:58:29PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> We often need to do read/write with buffer, not qiov. Instead of
>> creating qiov in such cases, let's introduce corresponding helpers.
>>
>> Vladimir Sementsov-Ogievskiy (9):
>>    block: introduce byte-based io helpers
>>    block/qcow2: use buffer-based io
>>    block/qcow: use buffer-based io
>>    block/qed: use buffer-based io
>>    block/parallels: use buffer-based io
>>    block/backup: use buffer-based io
>>    block/commit: use buffer-based io
>>    block/stream: use buffer-based io
>>    qemu-img: use buffer-based io
>>
>>   include/block/block_int.h      | 16 ++++++++++++++++
>>   include/sysemu/block-backend.h | 19 +++++++++++++++++++
>>   block/backup.c                 | 14 ++++++--------
>>   block/commit.c                 |  5 ++---
>>   block/parallels.c              | 14 ++++++--------
>>   block/qcow.c                   | 19 ++++++-------------
>>   block/qcow2.c                  |  9 ++-------
>>   block/qed-table.c              | 12 +++++-------
>>   block/qed.c                    |  6 ++----
>>   block/stream.c                 |  4 +---
>>   qemu-img.c                     | 13 ++++---------
>>   11 files changed, 69 insertions(+), 62 deletions(-)
>>
>> -- 
>> 2.18.0
>>
> 
> The series LGTM and new helpers could be very useful!
> 
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> 

Thanks!


-- 
Best regards,
Vladimir
Re: [Qemu-devel] [PATCH 0/9] block: buffer-based io
Posted by Kevin Wolf 4 years, 11 months ago
Am 22.04.2019 um 16:58 hat Vladimir Sementsov-Ogievskiy geschrieben:
> Hi all!
> 
> We often need to do read/write with buffer, not qiov. Instead of
> creating qiov in such cases, let's introduce corresponding helpers.

Thanks, applied to the block branch.

As I wrote in patch 4, a follow-up that adds coroutine_fn markers where
we rely on being in coroutine context now would be nice.

Kevin