]> git.pld-linux.org Git - packages/accelio.git/blob - accelio-fio.patch
- adjusted fio patch for fio 3+ (with nanosecond precision); release 4
[packages/accelio.git] / accelio-fio.patch
1 --- accelio-1.7/examples/raio/usr/fio/libraio.c.orig    2016-12-24 13:09:13.375548622 +0100
2 +++ accelio-1.7/examples/raio/usr/fio/libraio.c 2016-12-25 00:04:40.251766246 +0100
3 @@ -107,7 +107,7 @@
4  
5  static struct io_u *fio_libraio_event(struct thread_data *td, int event)
6  {
7 -       struct libraio_data *ld = td->io_ops->data;
8 +       struct libraio_data *ld = td->io_ops_data;
9         struct raio_event *ev;
10         struct io_u *io_u;
11  
12 @@ -129,8 +129,8 @@
13  static int fio_libraio_getevents(struct thread_data *td, unsigned int min,
14                                  unsigned int max, const struct timespec *t)
15  {
16 -       struct libraio_data *ld = td->io_ops->data;
17 -       unsigned actual_min = td->o.iodepth_batch_complete == 0 ? 0 : min;
18 +       struct libraio_data *ld = td->io_ops_data;
19 +       unsigned actual_min = td->o.iodepth_batch_complete_min == 0 ? 0 : min;
20         int r, events = 0;
21  
22         do {
23 @@ -152,7 +152,7 @@
24  
25  static int fio_libraio_queue(struct thread_data *td, struct io_u *io_u)
26  {
27 -       struct libraio_data *ld = td->io_ops->data;
28 +       struct libraio_data *ld = td->io_ops_data;
29         struct libraio_engine_data *engine_data = io_u->engine_data;
30  
31         fio_ro_check(td, io_u);
32 @@ -170,7 +170,7 @@
33  static void fio_libraio_queued(struct thread_data *td, struct io_u **io_us,
34                                unsigned int nr)
35  {
36 -       struct timeval now;
37 +       struct timespec now;
38         unsigned int i;
39  
40         if (!fio_fill_issue_time(td))
41 @@ -188,7 +188,7 @@
42  
43  static int fio_libraio_commit(struct thread_data *td)
44  {
45 -       struct libraio_data     *ld = td->io_ops->data;
46 +       struct libraio_data     *ld = td->io_ops_data;
47         struct raio_iocb        **iocbs;
48         struct io_u             **io_us;
49         int                     ret;
50 @@ -221,7 +221,7 @@
51  
52  static int fio_libraio_cancel(struct thread_data *td, struct io_u *io_u)
53  {
54 -       struct libraio_data *ld = td->io_ops->data;
55 +       struct libraio_data *ld = td->io_ops_data;
56         struct libraio_engine_data *engine_data = io_u->engine_data;
57  
58         return raio_cancel(ld->raio_ctx, &engine_data->iocb, ld->raio_events);
59 @@ -290,7 +290,7 @@
60  
61         *_flags = -1;
62  
63 -       if (td_trim(td) && f->filetype != FIO_TYPE_BD) {
64 +       if (td_trim(td) && f->filetype != FIO_TYPE_BLOCK) {
65                 log_err("libraio: trim only applies to block device\n");
66                 return 1;
67         }
68 @@ -357,7 +357,7 @@
69         char                    path[256];
70         char                    host[256];
71         uint32_t                port;
72 -       struct libraio_data     *ld = td->io_ops->data;
73 +       struct libraio_data     *ld = td->io_ops_data;
74  
75         dprint(FD_FILE, "fd open %s\n", f->file_name);
76  
77 @@ -436,7 +436,7 @@
78  static int fio_libraio_open_file(struct thread_data *td, struct fio_file *f)
79  {
80         int                     ret;
81 -       struct libraio_data     *ld = td->io_ops->data;
82 +       struct libraio_data     *ld = td->io_ops_data;
83  
84         if (ld->fd != -1) {
85                 f->fd = ld->fd;
86 @@ -475,7 +475,7 @@
87  static int fio_libraio_close_file(struct thread_data *td, struct fio_file *f)
88  {
89         int                     ret;
90 -       struct libraio_data     *ld = td->io_ops->data;
91 +       struct libraio_data     *ld = td->io_ops_data;
92  
93         /* don't close the file until cleanup */
94         if (ld->force_close == 0) {
95 @@ -512,7 +512,7 @@
96                 return 0;
97         }
98  
99 -       td->io_ops->data = &dummy_ld;
100 +       td->io_ops_data = &dummy_ld;
101  
102         ret = fio_libraio_open(td, f);
103         if (ret != 0) {
104 @@ -570,7 +570,7 @@
105         ld->iocbs_nr = 0;
106         ld->fd = -1;
107  
108 -       td->io_ops->data = ld;
109 +       td->io_ops_data = ld;
110  
111         f.file_name = td->o.filename;
112         ret = fio_libraio_open_file(td, &f);
113 @@ -597,7 +597,7 @@
114  
115  static void fio_libraio_cleanup(struct thread_data *td)
116  {
117 -       struct libraio_data             *ld = td->io_ops->data;
118 +       struct libraio_data             *ld = td->io_ops_data;
119         struct libraio_engine_data      *engine_data;
120         struct io_u                     *io_u;
121         int                             i;
122 @@ -619,7 +619,7 @@
123                 free(ld->io_us);
124                 free(ld->engine_datas);
125                 free(ld);
126 -               td->io_ops->data = NULL;
127 +               td->io_ops_data = NULL;
128         }
129  }
130  
131 --- accelio-1.6/examples/raio/usr/fio/Makefile.am.orig  2016-03-28 14:58:45.000000000 +0200
132 +++ accelio-1.6/examples/raio/usr/fio/Makefile.am       2016-04-10 21:54:08.050356893 +0200
133 @@ -30,6 +30,7 @@
134  # list of sources for the 'libraio_fio' shared library\r
135  libraio_fio_la_SOURCES = libraio.c\r
136  \r
137 +libraio_fio_la_LDFLAGS = -module -avoid-version
138  libraio_fio_la_LIBADD = -lraio -lxio $(libxio_rdma_ldflags) -lrt -ldl -lpthread  \\r
139                         -L$(top_builddir)/src/usr/ -L$(top_builddir)/examples/raio/\r
140  \r
This page took 0.0593900000000001 seconds and 3 git commands to generate.