On Fri, 9 May 2025 15:40:28 -0500, Eric Blake wrote:
> @@ -847,8 +887,10 @@ static int coroutine_fn GRAPH_UNLOCKED
> mirror_dirty_init(MirrorBlockJob *s)
> bool punch_holes =
> target_bs->detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP &&
> bdrv_can_write_zeroes_with_u
Rebase later in series, revise logic for pre-zeroing [Sunny], add
> in python filter
> ---
> block/mirror.c| 24
> tests/qemu-iotests/194| 6 --
> tests/qemu-iotests/194.out| 4 ++--
> tests/qemu-iotests/iotests.py | 12 +++-
> 4 files changed, 33 insertions(+), 13 deletions(-)
Reviewed-by: Sunny Zhu
othread.c | 2 +-
> 4 files changed, 11 insertions(+), 22 deletions(-)
Reviewed-by: Sunny Zhu
t (in many aspects simpler, but now
> catering to "detect-zeroes":"unmap") so Acked-by on QMP kept, but
> Reviewed-by dropped.
> ---
> qapi/block-core.json | 8 +++-
> include/block/block_int-global-state.h | 3 ++-
> block/mirror.c | 27 ++
> blockdev.c | 18 ++---
> tests/unit/test-block-iothread.c | 2 +-
> 5 files changed, 44 insertions(+), 14 deletions(-)
Reviewed-by: Sunny Zhu
On Fri, May 09, 2025 at 03:40:25PM -0500, Eric Blake wrote:
> QEMU has an optimization for a just-created drive-mirror destination
> that is not possible for blockdev-mirror (which can't create the
> destination) - any time we know the destination starts life as all
> zeroes, we can skip a pre-zero
>
> ---
>
> v4: new patch
> ---
> block/mirror.c | 24 ----
> 1 file changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Sunny Zhu
On Thu, 1 May 2025 12:58:42 -0500, Eric wrote:
> On Thu, May 01, 2025 at 12:38:30AM +0800, Sunny Zhu wrote:
> > on Thu 24 Apr 2025 19:52:08 -0500, Eric wrote:
> > > if (s->zero_target) {
> > > +int64_t bitmap_length = DIV_ROUND_UP(s->b
On Thu, 1 May 2025 12:33:14 -0500, Eric wrote:
> > > + * If the destination already reads as zero, and we are not
> > > + * requested to punch holes into existing zeroes, then we can
> > > + * skip pre-zeroing the destination.
> > > + */
> > > +if (ret > 0 &&
on Thu 24 Apr 2025 19:52:08 -0500, Eric wrote:
> if (s->zero_target) {
> +int64_t bitmap_length = DIV_ROUND_UP(s->bdev_length, s->granularity);
> +
> offset = 0;
> bdrv_graph_co_rdlock();
> ret = bdrv_co_is_all_zeroes(target_bs);
> @@ -856,6 +898,7 @@ static
> When doing a sync=full mirroring, QMP drive-mirror requests full
> zeroing if it did not just create the destination, and blockdev-mirror
> requests full zeroing unconditionally. This is because during a full
> sync, we must ensure that the portions of the disk that are not
> otherwise touched b
on Thu, 17 Apr 2025 13:39:13 -0500, Eric Blake wrote:
> When mirroring, the goal is to ensure that the destination reads the
> same as the source; this goal is met whether the destination is sparse
> or fully-allocated. However, if the destination cannot efficiently
> write zeroes, then any time t
d. If someone needs
to implement bdrv_aio_pdiscard, a coroutine-based version would be
straightforward to implement.
Signed-off-by: Sunny Zhu
---
block/io.c | 22 +++---
include/block/block_int-common.h | 4
2 files changed, 3 insertions(+), 23 deletions(-)
Eric Blake wrote:
>On Mon, Apr 21, 2025 at 12:19:14AM +0800, Sunny Zhu wrote:
>> Keep it consistent with *bdrv_co_pdiscard.
>>
>> Currently, there is no BlockDriver implemented the bdrv_aio_pdiscard()
>> function,
>> so we don’t need to make any adaptations e
Keep it consistent with *bdrv_co_pdiscard.
Currently, there is no BlockDriver implemented the bdrv_aio_pdiscard() function,
so we don’t need to make any adaptations either.
Signed-off-by: Sunny Zhu
---
include/block/block_int-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
14 matches
Mail list logo