| 28 | static int warned; |
| 29 | |
| 30 | static int create_nonaligned_buffers(void) |
| 31 | { |
| 32 | int i; |
| 33 | |
| 34 | vecs = t_malloc(BUFFERS * sizeof(struct iovec)); |
| 35 | for (i = 0; i < BUFFERS; i++) { |
| 36 | char *p = t_malloc(3 * BS); |
| 37 | |
| 38 | if (!p) |
| 39 | return 1; |
| 40 | vecs[i].iov_base = p + (rand() % BS); |
| 41 | vecs[i].iov_len = 1 + (rand() % BS); |
| 42 | } |
| 43 | |
| 44 | return 0; |
| 45 | } |
| 46 | |
| 47 | static int _test_io(const char *file, struct io_uring *ring, int write, |
| 48 | int buffered, int sqthread, int fixed, int nonvec, |