comparison src/core/ngx_buf.h @ 5980:ccad84a174e0

Refactored sendfile() AIO preload. This reduces layering violation and simplifies the logic of AIO preread, since it's now triggered by the send chain function itself without falling back to the copy filter. The context of AIO operation is now stored per file buffer, which makes it possible to properly handle cases when multiple buffers come from different locations, each with its own configuration.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 11 Feb 2015 17:52:15 +0300
parents ac3f78219f85
children 0f234ee664f7
comparison
equal deleted inserted replaced
5979:b2920b517490 5980:ccad84a174e0
92 unsigned need_in_temp:1; 92 unsigned need_in_temp:1;
93 #if (NGX_HAVE_FILE_AIO) 93 #if (NGX_HAVE_FILE_AIO)
94 unsigned aio:1; 94 unsigned aio:1;
95 95
96 ngx_output_chain_aio_pt aio_handler; 96 ngx_output_chain_aio_pt aio_handler;
97 #if (NGX_HAVE_FILE_AIO)
98 ssize_t (*aio_preload)(ngx_buf_t *file);
99 #endif
97 #endif 100 #endif
98 101
99 off_t alignment; 102 off_t alignment;
100 103
101 ngx_pool_t *pool; 104 ngx_pool_t *pool;