Specifying "sendfile on" along with "aio on" activates the
aio pre-loading mode for sendfile().
ctx->filter_ctx = r;
#if (NGX_HAVE_FILE_AIO)
- if (ngx_file_aio) {
- if (clcf->aio) {
- ctx->aio_handler = ngx_http_copy_aio_handler;
- }
+ if (ngx_file_aio && clcf->aio) {
+ ctx->aio_handler = ngx_http_copy_aio_handler;
#if (NGX_HAVE_AIO_SENDFILE)
- if (clcf->aio == NGX_HTTP_AIO_SENDFILE) {
- ctx->aio_preload = ngx_http_copy_aio_sendfile_preload;
- }
+ ctx->aio_preload = ngx_http_copy_aio_sendfile_preload;
#endif
}
#endif
{ ngx_string("off"), NGX_HTTP_AIO_OFF },
{ ngx_string("on"), NGX_HTTP_AIO_ON },
#if (NGX_HAVE_AIO_SENDFILE)
- { ngx_string("sendfile"), NGX_HTTP_AIO_SENDFILE },
+ { ngx_string("sendfile"), NGX_HTTP_AIO_ON },
#endif
{ ngx_null_string, 0 }
};
#define NGX_HTTP_AIO_OFF 0
#define NGX_HTTP_AIO_ON 1
-#define NGX_HTTP_AIO_SENDFILE 2
#define NGX_HTTP_SATISFY_ALL 0