2 * Handler for virtio-blk I/O
4 * Copyright (C) 2022 Bytedance Inc. and/or its affiliates. All rights reserved.
7 * Xie Yongji <xieyongji@bytedance.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or
10 * later. See the COPYING file in the top-level directory.
13 #ifndef VIRTIO_BLK_HANDLER_H
14 #define VIRTIO_BLK_HANDLER_H
16 #include "sysemu/block-backend.h"
18 #define VIRTIO_BLK_SECTOR_BITS 9
19 #define VIRTIO_BLK_SECTOR_SIZE (1ULL << VIRTIO_BLK_SECTOR_BITS)
21 #define VIRTIO_BLK_MAX_DISCARD_SECTORS 32768
22 #define VIRTIO_BLK_MAX_WRITE_ZEROES_SECTORS 32768
27 uint32_t logical_block_size
;
31 int coroutine_fn
virtio_blk_process_req(VirtioBlkHandler
*handler
,
33 struct iovec
*out_iov
,
35 unsigned int out_num
);
37 #endif /* VIRTIO_BLK_HANDLER_H */