block: Make blk_co_pwrite() take a const buffer

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>
This commit is contained in:
Alberto Faria 2022-07-05 17:15:13 +01:00 committed by Hanna Reitz
parent 40fb4861b2
commit 7d252ba5ca

View File

@ -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);