]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/KernelDevice: fix race in aio_thread vs aio_wait 12204/head
authorSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 20:56:29 +0000 (15:56 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 20:56:29 +0000 (15:56 -0500)
commit6ffaa54c9b32575d9d633c47f7fe2c3dcf072000
tree84095f906a164e44c5a0bb47ff0856e8a2fe6455
parent308c4ec9ae474fb776b58bff62195307fd50979b
os/bluestore/KernelDevice: fix race in aio_thread vs aio_wait

The caller is free to destroy the aio vector contents
once aio_wait completes.  This is exactly what
BlueFS::_fsync() does.  Delay the num_running dec
(which is what aio_wait waits for) until after we've
examined the aios.

Fixes: http://tracker.ceph.com/issues/17824
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/KernelDevice.cc