[nginx] Fixed AIO handling in the output chain.

Valentin Bartenev vbart at nginx.com
Mon Feb 2 14:23:38 UTC 2015


details:   http://hg.nginx.org/nginx/rev/bcdfc39bf44d
branches:  
changeset: 5966:bcdfc39bf44d
user:      Valentin Bartenev <vbart at nginx.com>
date:      Wed Jan 28 21:33:06 2015 +0300
description:
Fixed AIO handling in the output chain.

The ctx->aio flag must be taken into account in the short path too.

diffstat:

 src/core/ngx_output_chain.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 78271500b8de -r bcdfc39bf44d src/core/ngx_output_chain.c
--- a/src/core/ngx_output_chain.c	Tue Jan 27 15:38:15 2015 +0300
+++ b/src/core/ngx_output_chain.c	Wed Jan 28 21:33:06 2015 +0300
@@ -45,8 +45,12 @@ ngx_output_chain(ngx_output_chain_ctx_t 
     ngx_int_t     rc, last;
     ngx_chain_t  *cl, *out, **last_out;
 
-    if (ctx->in == NULL && ctx->busy == NULL) {
-
+    if (ctx->in == NULL && ctx->busy == NULL
+#if (NGX_HAVE_FILE_AIO)
+        && !ctx->aio
+#endif
+       )
+    {
         /*
          * the short path for the case when the ctx->in and ctx->busy chains
          * are empty, the incoming chain is empty too or has the single buf



More information about the nginx-devel mailing list