Welcome! Log In Create A New Profile

Advanced

[nginx] Deprecated "aio sendfile".

Ruslan Ermilov
March 12, 2015 01:08PM
details: http://hg.nginx.org/nginx/rev/2dac6ae6d703
branches:
changeset: 6004:2dac6ae6d703
user: Ruslan Ermilov <ru@nginx.com>
date: Thu Mar 12 20:06:04 2015 +0300
description:
Deprecated "aio sendfile".

Specifying "sendfile on" along with "aio on" activates the
aio pre-loading mode for sendfile().

diffstat:

src/http/ngx_http_copy_filter_module.c | 10 +++-------
src/http/ngx_http_core_module.c | 2 +-
src/http/ngx_http_core_module.h | 1 -
3 files changed, 4 insertions(+), 9 deletions(-)

diffs (44 lines):

diff -r cf2f8d91cf09 -r 2dac6ae6d703 src/http/ngx_http_copy_filter_module.c
--- a/src/http/ngx_http_copy_filter_module.c Wed Mar 04 08:12:53 2015 +0300
+++ b/src/http/ngx_http_copy_filter_module.c Thu Mar 12 20:06:04 2015 +0300
@@ -121,14 +121,10 @@ ngx_http_copy_filter(ngx_http_request_t
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
diff -r cf2f8d91cf09 -r 2dac6ae6d703 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Wed Mar 04 08:12:53 2015 +0300
+++ b/src/http/ngx_http_core_module.c Thu Mar 12 20:06:04 2015 +0300
@@ -120,7 +120,7 @@ static ngx_conf_enum_t ngx_http_core_ai
{ 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 }
};
diff -r cf2f8d91cf09 -r 2dac6ae6d703 src/http/ngx_http_core_module.h
--- a/src/http/ngx_http_core_module.h Wed Mar 04 08:12:53 2015 +0300
+++ b/src/http/ngx_http_core_module.h Thu Mar 12 20:06:04 2015 +0300
@@ -27,7 +27,6 @@

#define NGX_HTTP_AIO_OFF 0
#define NGX_HTTP_AIO_ON 1
-#define NGX_HTTP_AIO_SENDFILE 2


#define NGX_HTTP_SATISFY_ALL 0

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Deprecated "aio sendfile".

Ruslan Ermilov 614 March 12, 2015 01:08PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 320
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready