Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / librbd / io / Types.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_LIBRBD_IO_TYPES_H
5 #define CEPH_LIBRBD_IO_TYPES_H
6
7 #include "include/int_types.h"
8 #include <map>
9 #include <vector>
10
11 namespace librbd {
12 namespace io {
13
14 typedef enum {
15   AIO_TYPE_NONE = 0,
16   AIO_TYPE_GENERIC,
17   AIO_TYPE_OPEN,
18   AIO_TYPE_CLOSE,
19   AIO_TYPE_READ,
20   AIO_TYPE_WRITE,
21   AIO_TYPE_DISCARD,
22   AIO_TYPE_FLUSH,
23   AIO_TYPE_WRITESAME,
24   AIO_TYPE_COMPARE_AND_WRITE,
25 } aio_type_t;
26
27 enum Direction {
28   DIRECTION_READ,
29   DIRECTION_WRITE,
30   DIRECTION_BOTH
31 };
32
33 typedef std::vector<std::pair<uint64_t, uint64_t> > Extents;
34 typedef std::map<uint64_t, uint64_t> ExtentMap;
35
36 } // namespace io
37 } // namespace librbd
38
39 #endif // CEPH_LIBRBD_IO_TYPES_H
40