fixes aio error handling aio

Wed, 10 Jan 2018 17:25:55 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 10 Jan 2018 17:25:55 +0100
branch
aio
changeset 186
8041ac363f26
parent 185
b4d7ccf4e06d
child 187
4384bfbb7e26

fixes aio error handling

src/server/safs/service.c file | annotate | diff | comparison | revisions
--- a/src/server/safs/service.c	Wed Jan 10 15:46:17 2018 +0100
+++ b/src/server/safs/service.c	Wed Jan 10 17:25:55 2018 +0100
@@ -345,6 +345,7 @@
         asr->aio->offset += asr->aio->result;
         size_t length = asr->end - asr->offset;
         asr->aio->nbytes = AIO_BUF_SIZE < length ? AIO_BUF_SIZE : length;
+        asr->read_inprogress = TRUE;
         if(system_aio_read(asr->aio)) {
             asr->error = TRUE;
             return 1;
@@ -482,6 +483,7 @@
     asr->aio = aio;
     asr->wpos = 0;
     
+    asr->read_inprogress = TRUE;
     if(system_aio_read(aio)) {
         send_range_cleanup(asr);
         return REQ_ABORTED;

mercurial