]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/filestore: handle EINTR returned by io_getevents()
authorPan Liu <pan.liu@istuary.com>
Mon, 14 Nov 2016 10:20:09 +0000 (18:20 +0800)
committerPan Liu <pan.liu@istuary.com>
Mon, 14 Nov 2016 10:20:09 +0000 (18:20 +0800)
Signed-off-by: Pan Liu <pan.liu@istuary.com>
src/os/fs/FS.cc

index d2a9f350d343f202e247eaacd3a7b0e39ce8b536..b25fe07c1aecd1738f9cb58306ab7ea2cced14f5 100644 (file)
@@ -215,7 +215,12 @@ int FS::aio_queue_t::get_next_completed(int timeout_ms, aio_t **paio, int max)
     timeout_ms / 1000,
     (timeout_ms % 1000) * 1000 * 1000
   };
-  int r = io_getevents(ctx, 1, max, event, &t);
+
+  int r = 0;
+  do {
+    r = io_getevents(ctx, 1, max, event, &t);
+  } while (r == -EINTR);
+  
   if (r <= 0) {
     return r;
   }