Skip to content
Commit d1d25646 authored by Josh Durgin's avatar Josh Durgin Committed by Sage Weil
Browse files

rbd: use reference counting for the snap context



This prevents a race between requests with a given snap context and
header updates that free it. The osd client was already expecting the
snap context to be reference counted, since it get()s it in
ceph_osdc_build_request and put()s it when the request completes.

Also remove the second down_read()/up_read() on header_rwsem in
rbd_do_request, which wasn't actually preventing this race or
protecting any other data.

Signed-off-by: default avatarJosh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: default avatarAlex Elder <elder@inktank.com>
parent 93a24e08
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment