]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: hold AioCompletion lock while modifying global state
authorDan Mick <dan.mick@inktank.com>
Tue, 4 Dec 2012 04:59:17 +0000 (20:59 -0800)
committerDan Mick <dan.mick@inktank.com>
Thu, 6 Dec 2012 01:38:05 +0000 (17:38 -0800)
commite9653f27de614c37a7f56c6f9e44871baf0603e4
treef2236ef8a32777839e8508c256cf68d8ba65a9c6
parentb2ccf11d3a108141f113f3f5640d459205f208f2
librbd: hold AioCompletion lock while modifying global state

C_AioRead::finish needs to add in each chunk of a partial read
request to the 'partial' map in the AioCompletion's state
(in destriper, of type StripedReadResult).  That map is global
and must be protected from simultaneous access.  Use the
AioCompletion lock; could create a separate lock if contention is an
issue.

Fixes: #3567
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit a55700cc0aea0ff79e55c6bf78e9757b81fe9425)
src/librbd/AioCompletion.cc