]> 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:05:18 +0000 (17:05 -0800)
commita55700cc0aea0ff79e55c6bf78e9757b81fe9425
treef30fad567ce03da81f91dc32cf04764bfabbed2b
parent41e16a3b40efb80a5ed7a5587438569ca86c85a3
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>
src/librbd/AioCompletion.cc