| 51 | } |
| 52 | |
| 53 | static int fill_pattern(int tc) |
| 54 | { |
| 55 | unsigned int val, *ptr; |
| 56 | int i, j; |
| 57 | int u_in_buf = BS / sizeof(val); |
| 58 | |
| 59 | val = (tc / 2) * FILE_SIZE; |
| 60 | for (i = 0; i < BUFFERS; i++) { |
| 61 | ptr = vecs[i].iov_base; |
| 62 | for (j = 0; j < u_in_buf; j++) { |
| 63 | *ptr = val; |
| 64 | val++; |
| 65 | ptr++; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | static int __test_io(const char *file, struct io_uring *ring, int tc, int read, |
| 73 | int sqthread, int fixed, int nonvec, int async, int linked) |