]> git.proxmox.com Git - mirror_qemu.git/blame - include/scsi/pr-manager.h
Mark assert_bdrv_graph_readable/writable() GRAPH_RD/WRLOCK
[mirror_qemu.git] / include / scsi / pr-manager.h
CommitLineData
7c9e5276
PB
1#ifndef PR_MANAGER_H
2#define PR_MANAGER_H
3
4#include "qom/object.h"
7c9e5276
PB
5#include "qapi/visitor.h"
6#include "qom/object_interfaces.h"
7#include "block/aio.h"
2f3a7ab3 8#include "qemu/coroutine.h"
7c9e5276
PB
9
10#define TYPE_PR_MANAGER "pr-manager"
11
c821774a 12OBJECT_DECLARE_TYPE(PRManager, PRManagerClass,
30b5707c 13 PR_MANAGER)
7c9e5276
PB
14
15struct sg_io_hdr;
16
db1015e9 17struct PRManager {
7c9e5276
PB
18 /* <private> */
19 Object parent;
db1015e9 20};
7c9e5276
PB
21
22/**
23 * PRManagerClass:
24 * @parent_class: the base class
25 * @run: callback invoked in thread pool context
26 */
db1015e9 27struct PRManagerClass {
7c9e5276
PB
28 /* <private> */
29 ObjectClass parent_class;
30
31 /* <public> */
32 int (*run)(PRManager *pr_mgr, int fd, struct sg_io_hdr *hdr);
5f640894 33 bool (*is_connected)(PRManager *pr_mgr);
db1015e9 34};
7c9e5276 35
5f640894 36bool pr_manager_is_connected(PRManager *pr_mgr);
2f3a7ab3
KW
37int coroutine_fn pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd,
38 struct sg_io_hdr *hdr);
7c9e5276 39
7c9e5276 40PRManager *pr_manager_lookup(const char *id, Error **errp);
7c9e5276
PB
41
42#endif