]> 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 @@ -188,7 +188,7 @@
33  
34  static int fio_libraio_commit(struct thread_data *td)
35  {
36 -       struct libraio_data     *ld = td->io_ops->data;
37 +       struct libraio_data     *ld = td->io_ops_data;
38         struct raio_iocb        **iocbs;
39         struct io_u             **io_us;
40         int                     ret;
41 @@ -221,7 +221,7 @@
42  
43  static int fio_libraio_cancel(struct thread_data *td, struct io_u *io_u)
44  {
45 -       struct libraio_data *ld = td->io_ops->data;
46 +       struct libraio_data *ld = td->io_ops_data;
47         struct libraio_engine_data *engine_data = io_u->engine_data;
48  
49         return raio_cancel(ld->raio_ctx, &engine_data->iocb, ld->raio_events);
50 @@ -290,7 +290,7 @@
51  
52         *_flags = -1;
53  
54 -       if (td_trim(td) && f->filetype != FIO_TYPE_BD) {
55 +       if (td_trim(td) && f->filetype != FIO_TYPE_BLOCK) {
56                 log_err("libraio: trim only applies to block device\n");
57                 return 1;
58         }
59 @@ -357,7 +357,7 @@
60         char                    path[256];
61         char                    host[256];
62         uint32_t                port;
63 -       struct libraio_data     *ld = td->io_ops->data;
64 +       struct libraio_data     *ld = td->io_ops_data;
65  
66         dprint(FD_FILE, "fd open %s\n", f->file_name);
67  
68 @@ -436,7 +436,7 @@
69  static int fio_libraio_open_file(struct thread_data *td, struct fio_file *f)
70  {
71         int                     ret;
72 -       struct libraio_data     *ld = td->io_ops->data;
73 +       struct libraio_data     *ld = td->io_ops_data;
74  
75         if (ld->fd != -1) {
76                 f->fd = ld->fd;
77 @@ -475,7 +475,7 @@
78  static int fio_libraio_close_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         /* don't close the file until cleanup */
85         if (ld->force_close == 0) {
86 @@ -512,7 +512,7 @@
87                 return 0;
88         }
89  
90 -       td->io_ops->data = &dummy_ld;
91 +       td->io_ops_data = &dummy_ld;
92  
93         ret = fio_libraio_open(td, f);
94         if (ret != 0) {
95 @@ -570,7 +570,7 @@
96         ld->iocbs_nr = 0;
97         ld->fd = -1;
98  
99 -       td->io_ops->data = ld;
100 +       td->io_ops_data = ld;
101  
102         f.file_name = td->o.filename;
103         ret = fio_libraio_open_file(td, &f);
104 @@ -597,7 +597,7 @@
105  
106  static void fio_libraio_cleanup(struct thread_data *td)
107  {
108 -       struct libraio_data             *ld = td->io_ops->data;
109 +       struct libraio_data             *ld = td->io_ops_data;
110         struct libraio_engine_data      *engine_data;
111         struct io_u                     *io_u;
112         int                             i;
113 @@ -619,7 +619,7 @@
114                 free(ld->io_us);
115                 free(ld->engine_datas);
116                 free(ld);
117 -               td->io_ops->data = NULL;
118 +               td->io_ops_data = NULL;
119         }
120  }
121  
122 --- accelio-1.6/examples/raio/usr/fio/Makefile.am.orig  2016-03-28 14:58:45.000000000 +0200
123 +++ accelio-1.6/examples/raio/usr/fio/Makefile.am       2016-04-10 21:54:08.050356893 +0200
124 @@ -30,6 +30,7 @@
125  # list of sources for the 'libraio_fio' shared library\r
126  libraio_fio_la_SOURCES = libraio.c\r
127  \r
128 +libraio_fio_la_LDFLAGS = -module -avoid-version
129  libraio_fio_la_LIBADD = -lraio -lxio $(libxio_rdma_ldflags) -lrt -ldl -lpthread  \\r
130                         -L$(top_builddir)/src/usr/ -L$(top_builddir)/examples/raio/\r
131  \r
This page took 0.111879 seconds and 3 git commands to generate.