[nginx] svn commit: r4956 - in branches/stable-1.2: . src/os/unix

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Dec 10 18:04:54 UTC 2012


Author: mdounin
Date: 2012-12-10 18:04:54 +0000 (Mon, 10 Dec 2012)
New Revision: 4956
URL: http://trac.nginx.org/nginx/changeset/4956/nginx

Log:
Merge of r4920, r4939: ngx_write_chain_to_file() fixes.

*) Core: added debug logging of writev() in ngx_write_chain_to_file().

*) Core: fixed ngx_write_chain_to_file() with IOV_MAX reached.

   Catched by dav_chunked.t on Solaris.  In released versions this might
   potentially result in corruption of complex protocol responses if they
   were written to disk and there were more distinct buffers than IOV_MAX
   in a single write.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/os/unix/ngx_files.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2012-12-10 17:51:10 UTC (rev 4955)
+++ branches/stable-1.2	2012-12-10 18:04:54 UTC (rev 4956)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4919
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4920,4939
\ No newline at end of property
Modified: branches/stable-1.2/src/os/unix/ngx_files.c
===================================================================
--- branches/stable-1.2/src/os/unix/ngx_files.c	2012-12-10 17:51:10 UTC (rev 4955)
+++ branches/stable-1.2/src/os/unix/ngx_files.c	2012-12-10 18:04:54 UTC (rev 4956)
@@ -241,8 +241,12 @@
             return NGX_ERROR;
         }
 
+        ngx_log_debug2(NGX_LOG_DEBUG_CORE, file->log, 0,
+                       "writev: %d, %z", file->fd, n);
+
         file->sys_offset += n;
         file->offset += n;
+        offset += n;
         total += n;
 
     } while (cl);



More information about the nginx-devel mailing list