| 1 | /* |
| 2 | Copyright (c) 2006-2012 Red Hat, Inc. <http://www.redhat.com> |
| 3 | This file is part of GlusterFS. |
| 4 | |
| 5 | This file is licensed to you under your choice of the GNU Lesser |
| 6 | General Public License, version 3 or any later version (LGPLv3 or |
| 7 | later), or the GNU General Public License, version 2 (GPLv2), in all |
| 8 | cases as published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef _POSIX_AIO_H |
| 11 | #define _POSIX_AIO_H |
| 12 | |
| 13 | // Maximum number of concurrently submitted IO events. The heaviest load |
| 14 | // GlusterFS has been able to handle had 60-80 concurrent calls |
| 15 | #define POSIX_AIO_MAX_NR_EVENTS 256 |
| 16 | |
| 17 | // Maximum number of completed IO operations to reap per getevents syscall |
| 18 | #define POSIX_AIO_MAX_NR_GETEVENTS 16 |
| 19 | |
| 20 | int |
| 21 | posix_aio_on(xlator_t *this); |
| 22 | int |
| 23 | posix_aio_off(xlator_t *this); |
| 24 | |
| 25 | int |
| 26 | posix_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, |
| 27 | off_t offset, uint32_t flags, dict_t *xdata); |
| 28 | |
| 29 | int |
| 30 | posix_writev(call_frame_t *frame, xlator_t *this, fd_t *fd, |
| 31 | struct iovec *vector, int32_t count, off_t offset, uint32_t flags, |
| 32 | struct iobref *iobref, dict_t *xdata); |
| 33 | |
| 34 | #endif /* !_POSIX_AIO_H */ |