]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/ReplicatedPG: greedily take write_lock for copyfrom finish, snapdir
authorSage Weil <sage@redhat.com>
Tue, 22 Jul 2014 20:16:11 +0000 (13:16 -0700)
committerSage Weil <sage@redhat.com>
Fri, 1 Aug 2014 23:39:23 +0000 (16:39 -0700)
commite32e2559c8ff408fff81cce0f15d6601dcd4a2f7
treed73964fab2a60873e52af84dbcbe50242d290f60
parent68651e9137df2b1034a5b470bbb2fc1d19d8debb
osd/ReplicatedPG: greedily take write_lock for copyfrom finish, snapdir

In the cases where we are taking a write lock and are careful
enough that we know we should succeed (i.e, we assert(got)),
use the get_write_greedy() variant that skips the checks for
waiters (be they ops or backfill) that are normally necessary
to avoid starvation.  We don't care about staration here
because our op is already in-progress and can't easily be
aborted, and new ops won't start because they do make those
checks.

Fixes: #8889
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 6fe27823b8459271bf0c0e807493bb7cf1e4559b)
src/osd/ReplicatedPG.cc