qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d95316: util/iov: introduce qemu_iovec_init_e


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d95316: util/iov: introduce qemu_iovec_init_extended
Date: Tue, 03 Sep 2019 03:05:47 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d953169d4840f312d3b9a54952f4a7ccfcb3b311
      
https://github.com/qemu/qemu/commit/d953169d4840f312d3b9a54952f4a7ccfcb3b311
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M include/qemu/iov.h
    M util/iov.c

  Log Message:
  -----------
  util/iov: introduce qemu_iovec_init_extended

Introduce new initialization API, to create requests with padding. Will
be used in the following patch. New API uses qemu_iovec_init_buf if
resulting io vector has only one element, to avoid extra allocations.
So, we need to update qemu_iovec_destroy to support destroying such
QIOVs.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: f76889e7b947d896db51be8a4d9c941c2f70365a
      
https://github.com/qemu/qemu/commit/f76889e7b947d896db51be8a4d9c941c2f70365a
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c
    M include/qemu/iov.h
    M util/iov.c

  Log Message:
  -----------
  util/iov: improve qemu_iovec_is_zero

We'll need to check a part of qiov soon, so implement it now.

Optimization with align down to 4 * sizeof(long) is dropped due to:
1. It is strange: it aligns length of the buffer, but where is a
   guarantee that buffer pointer is aligned itself?
2. buffer_is_zero() is a better place for optimizations and it has
   them.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 7a3f542fbdfd799be4fa6f8b96dc8c1e6933fce4
      
https://github.com/qemu/qemu/commit/7a3f542fbdfd799be4fa6f8b96dc8c1e6933fce4
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block/io: refactor padding

We have similar padding code in bdrv_co_pwritev,
bdrv_co_do_pwrite_zeroes and bdrv_co_preadv. Let's combine and unify
it.

[Squashed in Vladimir's qemu-iotests 077 fix
--Stefan]

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: ac850bf099f8a356788d487c5205345dfd755fca
      
https://github.com/qemu/qemu/commit/ac850bf099f8a356788d487c5205345dfd755fca
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/backup.c
    M block/io.c
    M include/block/block_int.h
    M qemu-img.c

  Log Message:
  -----------
  block: define .*_part io handlers in BlockDriver

Add handlers supporting qiov_offset parameter:
    bdrv_co_preadv_part
    bdrv_co_pwritev_part
    bdrv_co_pwritev_compressed_part
This is used to reduce need of defining local_qiovs and hd_qiovs in all
corners of block layer code. The following patches will increase usage
of this new API part by part.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 1143ec5ebf48d6dbf61f600eb5f875aefffb8fb6
      
https://github.com/qemu/qemu/commit/1143ec5ebf48d6dbf61f600eb5f875aefffb8fb6
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block/io: bdrv_co_do_copy_on_readv: use and support qiov_offset

Use and support new API in bdrv_co_do_copy_on_readv. Note that in case
of allocated-in-top we need to shrink read size to MIN(..) by hand, as
pre-patch this was actually done implicitly by qemu_iovec_concat (and
we used local_qiov.size).

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 2275cc90a1c146abdd86e24d929a9682628a8c4b
      
https://github.com/qemu/qemu/commit/2275cc90a1c146abdd86e24d929a9682628a8c4b
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block/io: bdrv_co_do_copy_on_readv: lazy allocation

Allocate bounce_buffer only if it is really needed. Also, sub-optimize
allocation size (why not?).

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 65cd4424b9df03bb5195351c33e04cbbecc0705c
      
https://github.com/qemu/qemu/commit/65cd4424b9df03bb5195351c33e04cbbecc0705c
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block/io: bdrv_aligned_preadv: use and support qiov_offset

Use and support new API in bdrv_co_do_copy_on_readv.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 28c4da28695bdbe04b336b2c9c463876cc3aaa6d
      
https://github.com/qemu/qemu/commit/28c4da28695bdbe04b336b2c9c463876cc3aaa6d
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block/io: bdrv_aligned_pwritev: use and support qiov_offset

Use and support new API in bdrv_aligned_pwritev.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 1acc3466a2fbbeb988b91f2ac05bb9cde1fc8e9d
      
https://github.com/qemu/qemu/commit/1acc3466a2fbbeb988b91f2ac05bb9cde1fc8e9d
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/io.c
    M include/block/block_int.h

  Log Message:
  -----------
  block/io: introduce bdrv_co_p{read, write}v_part

Introduce extended variants of bdrv_co_preadv and bdrv_co_pwritev
with qiov_offset parameter.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 00721a3529977004da50207ecb4769ef251d7ede
      
https://github.com/qemu/qemu/commit/00721a3529977004da50207ecb4769ef251d7ede
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  block/qcow2: refactor qcow2_co_preadv to use buffer-based io

Use buffer based io in encrypted case.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: df893d25ceea3c0dcbe6d6b425309317fab6b22e
      
https://github.com/qemu/qemu/commit/df893d25ceea3c0dcbe6d6b425309317fab6b22e
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2.c

  Log Message:
  -----------
  block/qcow2: implement .bdrv_co_preadv_part

Implement and use new interface to get rid of hd_qiov.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 5396234b96a2ac743f48644529771498e036e698
      
https://github.com/qemu/qemu/commit/5396234b96a2ac743f48644529771498e036e698
  Author: Vladimir Sementsov-Ogievskiy <address@hidden>
  Date:   2019-08-27 (Tue, 27 Aug 2019)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/qcow2.h
    M include/qemu/iov.h
    M util/iov.c

  Log Message:
  -----------
  block/qcow2: implement .bdrv_co_pwritev(_compressed)_part

Implement and use new interface to get rid of hd_qiov.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 54b89db5309d5fa8b5d3fe5fe56f81704e2f9706
      
https://github.com/qemu/qemu/commit/54b89db5309d5fa8b5d3fe5fe56f81704e2f9706
  Author: Peter Maydell <address@hidden>
  Date:   2019-09-03 (Tue, 03 Sep 2019)

  Changed paths:
    M block/backup.c
    M block/io.c
    M block/qcow2-cluster.c
    M block/qcow2.c
    M block/qcow2.h
    M include/block/block_int.h
    M include/qemu/iov.h
    M qemu-img.c
    M util/iov.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into 
staging

Pull request

# gpg: Signature made Tue 27 Aug 2019 21:16:27 BST
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>" [full]
# gpg:                 aka "Stefan Hajnoczi <address@hidden>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  block/qcow2: implement .bdrv_co_pwritev(_compressed)_part
  block/qcow2: implement .bdrv_co_preadv_part
  block/qcow2: refactor qcow2_co_preadv to use buffer-based io
  block/io: introduce bdrv_co_p{read, write}v_part
  block/io: bdrv_aligned_pwritev: use and support qiov_offset
  block/io: bdrv_aligned_preadv: use and support qiov_offset
  block/io: bdrv_co_do_copy_on_readv: lazy allocation
  block/io: bdrv_co_do_copy_on_readv: use and support qiov_offset
  block: define .*_part io handlers in BlockDriver
  block/io: refactor padding
  util/iov: improve qemu_iovec_is_zero
  util/iov: introduce qemu_iovec_init_extended

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/d39b626343a1...54b89db5309d



reply via email to

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