]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: Implement blk_flush() using generated_co_wrapper
authorAlberto Faria <afaria@redhat.com>
Tue, 5 Jul 2022 16:15:22 +0000 (17:15 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 12 Jul 2022 10:14:56 +0000 (12:14 +0200)
Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220705161527.1054072-15-afaria@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/block-backend.c
block/coroutines.h
include/sysemu/block-backend-io.h

index 71585c0c0a82675db4369d95c77aa82cdbbff90f..783a77cf6d10832f3471e604d0586cd174b266bc 100644 (file)
@@ -1752,17 +1752,6 @@ int coroutine_fn blk_co_flush(BlockBackend *blk)
     return ret;
 }
 
-int blk_flush(BlockBackend *blk)
-{
-    int ret;
-
-    blk_inc_in_flight(blk);
-    ret = blk_do_flush(blk);
-    blk_dec_in_flight(blk);
-
-    return ret;
-}
-
 void blk_drain(BlockBackend *blk)
 {
     BlockDriverState *bs = blk_bs(blk);
index 2693ecabfbe240e1c4178bf90b4cfca864c401b3..7e94b9fa8361cb76d4655f12a95639cf7c42c9d0 100644 (file)
@@ -110,6 +110,4 @@ nbd_do_establish_connection(BlockDriverState *bs, bool blocking, Error **errp);
 int generated_co_wrapper
 blk_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
 
-int generated_co_wrapper blk_do_flush(BlockBackend *blk);
-
 #endif /* BLOCK_COROUTINES_H */
index 5a12a1f74f3cc16f6b54bb747e486e9ce6ea3aec..6954c3bb8cab99f65d414ac8ae7769f676134c39 100644 (file)
@@ -164,8 +164,8 @@ int generated_co_wrapper blk_pdiscard(BlockBackend *blk, int64_t offset,
 int coroutine_fn blk_co_pdiscard(BlockBackend *blk, int64_t offset,
                                  int64_t bytes);
 
+int generated_co_wrapper blk_flush(BlockBackend *blk);
 int coroutine_fn blk_co_flush(BlockBackend *blk);
-int blk_flush(BlockBackend *blk);
 
 int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf);