]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PrimaryLogPG: avoid infinite loop when flush collides with write lock 21653/head
authorSage Weil <sage@redhat.com>
Wed, 25 Apr 2018 20:32:38 +0000 (15:32 -0500)
committerSage Weil <sage@redhat.com>
Wed, 25 Apr 2018 20:34:21 +0000 (15:34 -0500)
commit41609ba1b24e5384494c7959494e19302b5a2429
treef093705390f81ff6ed197e591bb082617e42e046
parent52edad1e2392e9e591933d70cf8eba30185e1671
osd/PrimaryLogPG: avoid infinite loop when flush collides with write lock

We try to take a write lock with fop->op.  If we fail, fop->op is put
on the lock's waiting list.  Requeuing it again will simply kick off
processing of another instance of the same op, which will again fail
to take the lock, leading to an infinite loop that can't terminate
because requeue_op is doing a push_front and preventing other PG
messages that might release the lock.

Do the same write lock attempt on any dup_ops so that they too will
end up on the wait list.

It looks like this broke waaay back in commit d700d99f76e0a29bfb419bc85d19ef1950b62a9a,
a 2014 refactor of the OpContext behavior.

Fixes: https://tracker.ceph.com/issues/23664
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc