diff mbox series

[PULL,17/35] block: Make blk_co_pwrite() take a const buffer

Message ID 20220712180617.1362407-18-hreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/35] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}() | expand

Commit Message

Hanna Czenczek July 12, 2022, 6:05 p.m. UTC
From: Alberto Faria <afaria@redhat.com>

It does not mutate the buffer.

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-6-afaria@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
---
 include/sysemu/block-backend-io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/sysemu/block-backend-io.h b/include/sysemu/block-backend-io.h
index 8bf1296105..b048476a47 100644
--- a/include/sysemu/block-backend-io.h
+++ b/include/sysemu/block-backend-io.h
@@ -129,7 +129,7 @@  static inline int coroutine_fn blk_co_pread(BlockBackend *blk, int64_t offset,
 }
 
 static inline int coroutine_fn blk_co_pwrite(BlockBackend *blk, int64_t offset,
-                                             int64_t bytes, void *buf,
+                                             int64_t bytes, const void *buf,
                                              BdrvRequestFlags flags)
 {
     QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);