PostgreSQL Source Code: src/backend/storage/aio/aio_io.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

20

26

27

29

30

31

32

33

34

35

36

37

38

39

40

41int

43{

45

47

49}

50

53{

54 return ioh->op;

55}

56

59{

61}

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77void

79 int fd, int iovcnt, uint64 offset)

80{

82

86

88}

89

90void

92 int fd, int iovcnt, uint64 offset)

93{

95

99

101}

102

103

104

105

106

107

108

109

110

111

112

113

114

115void

117{

118 ssize_t result = 0;

120

122

123

124 switch (ioh->op)

125 {

132 break;

139 break;

141 elog(ERROR, "trying to execute invalid IO operation");

142 }

143

144 ioh->result = result < 0 ? -errno : result;

145

147

149}

150

151

152

153

154

155static void

157{

162

163

164

165

166

168}

169

170

171

172

173

174const char *

176{

178

179 switch (ioh->op)

180 {

182 return "invalid";

184 return "readv";

186 return "writev";

187 }

188

189 return NULL;

190}

191

192

193

194

195

196bool

198{

200

201 switch (ioh->op)

202 {

208 return false;

209 }

210

211 return false;

212}

213

214

215

216

217

218int

220{

222

224

225 switch (ioh->op)

226 {

231 default:

233 return 0;

234 }

235}

void pgaio_io_process_completion(PgAioHandle *ioh, int result)

PgAioBackend * pgaio_my_backend

void pgaio_io_stage(PgAioHandle *ioh, PgAioOp op)

void pgaio_io_perform_synchronously(PgAioHandle *ioh)

const char * pgaio_io_get_op_name(PgAioHandle *ioh)

void pgaio_io_start_readv(PgAioHandle *ioh, int fd, int iovcnt, uint64 offset)

PgAioOpData * pgaio_io_get_op_data(PgAioHandle *ioh)

bool pgaio_io_uses_fd(PgAioHandle *ioh, int fd)

static void pgaio_io_before_start(PgAioHandle *ioh)

PgAioOp pgaio_io_get_op(PgAioHandle *ioh)

int pgaio_io_get_iovec_length(PgAioHandle *ioh, struct iovec **iov)

void pgaio_io_start_writev(PgAioHandle *ioh, int fd, int iovcnt, uint64 offset)

int pgaio_io_get_iovec(PgAioHandle *ioh, struct iovec **iov)

bool pgaio_io_has_target(PgAioHandle *ioh)

Assert(PointerIsAligned(start, uint64))

#define INTERRUPTS_CAN_BE_PROCESSED()

#define START_CRIT_SECTION()

#define END_CRIT_SECTION()

static ssize_t pg_pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)

static ssize_t pg_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)

static int fd(const char *x, int i)

PgAioHandle * handed_out_io

struct PgAioOpData::@123 write

struct PgAioOpData::@122 read

static void pgstat_report_wait_start(uint32 wait_event_info)

static void pgstat_report_wait_end(void)