summaryrefslogtreecommitdiffhomepage
path: root/src/event/ngx_event.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2015-02-11 17:52:15 +0300
committerValentin Bartenev <vbart@nginx.com>2015-02-11 17:52:15 +0300
commit2b8d6ad805a0132844cfbc1cf1c6988dfe8c9973 (patch)
tree0cfe79e6cd5bd968c04ec176383c1fd0efc86757 /src/event/ngx_event.h
parent2b7e167dbb59a6d1152c644080e21782b8b675e3 (diff)
downloadnginx-2b8d6ad805a0132844cfbc1cf1c6988dfe8c9973.tar.gz
nginx-2b8d6ad805a0132844cfbc1cf1c6988dfe8c9973.tar.bz2
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.
Diffstat (limited to 'src/event/ngx_event.h')
-rw-r--r--src/event/ngx_event.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h
index a1643a134..555cda0f4 100644
--- a/src/event/ngx_event.h
+++ b/src/event/ngx_event.h
@@ -168,6 +168,10 @@ struct ngx_event_aio_s {
ngx_event_handler_pt handler;
ngx_file_t *file;
+#if (NGX_HAVE_AIO_SENDFILE)
+ ssize_t (*preload_handler)(ngx_buf_t *file);
+#endif
+
ngx_fd_t fd;
#if (NGX_HAVE_EVENTFD)
@@ -181,10 +185,6 @@ struct ngx_event_aio_s {
size_t nbytes;
#endif
-#if (NGX_HAVE_AIO_SENDFILE)
- off_t last_offset;
-#endif
-
ngx_aiocb_t aiocb;
ngx_event_t event;
};