ceph/ceph — pull request #1661 by liewegas (2014-04-12 00:54:51+00:00)
Title: objecter: make linger watch the correct pool/object

All fo the logic for cache tiers was put in recalc_op_target(), which was used
for directing objects. Objecter had a ugly parallel version recalc_linger_op_target
that ensures that we're watching for changes in the PG and redo the watch if it
moves, and this wasn't taking that into account.

At the same time, Yehuda's lcoking changes are harder because all of the mapping
logic is mixe dup in the session logic.

This moves it all into a separate data structure that is used by both Ops and LingerOps
and will hopefully make life better. There is no functional change besides moving
the fields into the nested structure *except* for recalc_linger_op now using the
shared helper and thus incorporating the tiering logic.

Updated the watch_notify functional tests to test on a cache tier, altho this
provides minimal coverage. I'm not sure we have a good watch/notify stress test
right now that would notice when the osd mapping changes and the watch doesn't move
properly.

I tested thi smanually with 'rbd watch ...' and confirmed that master will redo the
ewatch when the base pool's pg changes (wrong) and that this version behaves
correctly.