[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/25] block-backend: remove qatomic_mb_read()
From: |
Paolo Bonzini |
Subject: |
[PULL 17/25] block-backend: remove qatomic_mb_read() |
Date: |
Fri, 21 Apr 2023 11:33:08 +0200 |
There is already a barrier in AIO_WAIT_WHILE_INTERNAL(), thus the
qatomic_mb_read() is not adding anything.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/block-backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index 55efc735b442..5566ea059d55 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1845,7 +1845,7 @@ void blk_drain(BlockBackend *blk)
/* We may have -ENOMEDIUM completions in flight */
AIO_WAIT_WHILE(blk_get_aio_context(blk),
- qatomic_mb_read(&blk->in_flight) > 0);
+ qatomic_read(&blk->in_flight) > 0);
if (bs) {
bdrv_drained_end(bs);
@@ -1867,7 +1867,7 @@ void blk_drain_all(void)
aio_context_acquire(ctx);
/* We may have -ENOMEDIUM completions in flight */
- AIO_WAIT_WHILE(ctx, qatomic_mb_read(&blk->in_flight) > 0);
+ AIO_WAIT_WHILE(ctx, qatomic_read(&blk->in_flight) > 0);
aio_context_release(ctx);
}
--
2.40.0
- [PULL 09/25] lasi: fix RTC migration, (continued)
- [PULL 09/25] lasi: fix RTC migration, Paolo Bonzini, 2023/04/21
- [PULL 08/25] target/i386: Avoid unreachable variable declaration in mmu_translate(), Paolo Bonzini, 2023/04/21
- [PULL 11/25] target/mips: tcg: detect out-of-bounds accesses to cpu_gpr and cpu_gpr_hi, Paolo Bonzini, 2023/04/21
- [PULL 10/25] coverity: update COMPONENTS.md, Paolo Bonzini, 2023/04/21
- [PULL 13/25] io: mark mixed functions that can suspend, Paolo Bonzini, 2023/04/21
- [PULL 12/25] qapi-gen: mark coroutine QMP command functions as coroutine_fn, Paolo Bonzini, 2023/04/21
- [PULL 18/25] postcopy-ram: do not use qatomic_mb_read, Paolo Bonzini, 2023/04/21
- [PULL 14/25] migration: mark mixed functions that can suspend, Paolo Bonzini, 2023/04/21
- [PULL 15/25] monitor: mark mixed functions that can suspend, Paolo Bonzini, 2023/04/21
- [PULL 16/25] target/i386: Change wrong XFRM value in SGX CPUID leaf, Paolo Bonzini, 2023/04/21
- [PULL 17/25] block-backend: remove qatomic_mb_read(),
Paolo Bonzini <=
- [PULL 20/25] docs: explain effect of smp_read_barrier_depends() on modern architectures, Paolo Bonzini, 2023/04/21
- [PULL 21/25] nbd: a BlockExport always has a BlockBackend, Paolo Bonzini, 2023/04/21
- [PULL 23/25] configure: Honour cross-prefix when finding ObjC compiler, Paolo Bonzini, 2023/04/21
- [PULL 19/25] qemu-coroutine: remove qatomic_mb_read(), Paolo Bonzini, 2023/04/21
- [PULL 22/25] coverity: unify Fedora dockerfiles, Paolo Bonzini, 2023/04/21
- [PULL 25/25] tests: lcitool: Switch to OpenSUSE Leap 15.4, Paolo Bonzini, 2023/04/21
- [PULL 24/25] tests: libvirt-ci: Update to commit '2fa24dce8bc', Paolo Bonzini, 2023/04/21
- Re: [PULL 00/25] First batch of misc patches for QEMU 8.1, Richard Henderson, 2023/04/22