[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/18] block: Make blk_co_pwrite() take a const buffer
From: |
Alberto Faria |
Subject: |
[PATCH 05/18] block: Make blk_co_pwrite() take a const buffer |
Date: |
Tue, 17 May 2022 12:38:24 +0100 |
It does not mutate the buffer.
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
include/sysemu/block-backend-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sysemu/block-backend-io.h
b/include/sysemu/block-backend-io.h
index 6630316795..6440e92028 100644
--- a/include/sysemu/block-backend-io.h
+++ b/include/sysemu/block-backend-io.h
@@ -130,7 +130,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);
--
2.35.3
- Re: [PATCH 02/18] block: Add a 'flags' param to blk_pread(), (continued)
- [PATCH 01/18] block: Make blk_{pread,pwrite}() return 0 on success, Alberto Faria, 2022/05/17
- [PATCH 03/18] block: Change blk_{pread,pwrite}() param order, Alberto Faria, 2022/05/17
- [PATCH 04/18] block: Make 'bytes' param of blk_{pread, pwrite}() an int64_t, Alberto Faria, 2022/05/17
- [PATCH 06/18] block: Implement blk_{pread, pwrite}() using generated_co_wrapper, Alberto Faria, 2022/05/17
- [PATCH 11/18] block: Add blk_co_pwrite_compressed(), Alberto Faria, 2022/05/17
- [PATCH 05/18] block: Make blk_co_pwrite() take a const buffer,
Alberto Faria <=
- [PATCH 07/18] block: Add blk_{preadv,pwritev}(), Alberto Faria, 2022/05/17
- [PATCH 09/18] block: Export blk_pwritev_part() in block-backend-io.h, Alberto Faria, 2022/05/17
- [PATCH 08/18] block: Add blk_[co_]preadv_part(), Alberto Faria, 2022/05/17
- [PATCH 12/18] block: Implement blk_pwrite_zeroes() using generated_co_wrapper, Alberto Faria, 2022/05/17
- [PATCH 14/18] block: Implement blk_flush() using generated_co_wrapper, Alberto Faria, 2022/05/17