mirror of
https://github.com/apache/nuttx.git
synced 2026-10-08 23:05:20 +00:00
fs/aio: add configurable AIO_LISTIO_MAX limit
lio_listio() never validated 'nent' against {AIO_LISTIO_MAX}, so a
batch larger than the documented limit was silently accepted, and the
hard-coded _POSIX_AIO_LISTIO_MAX value of 2 was too small for real
workloads (LTP uses 10 entries per call).
Add the FS_AIO_LISTIO_MAX Kconfig option (default 10), use it for
_POSIX_AIO_LISTIO_MAX in include/limits.h, validate 'nent' in
lio_listio(), and report the limit through sysconf(_SC_AIO_LISTIO_MAX).
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
This commit is contained in:
parent
1ea86e65fd
commit
2f4d017bb6
4 changed files with 18 additions and 2 deletions
|
|
@ -188,7 +188,7 @@
|
|||
|
||||
/* Required for asynchronous I/O */
|
||||
|
||||
#define _POSIX_AIO_LISTIO_MAX 2
|
||||
#define _POSIX_AIO_LISTIO_MAX CONFIG_FS_AIO_LISTIO_MAX
|
||||
#define _POSIX_AIO_MAX 1
|
||||
|
||||
/* Required for POSIX message passing */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue