ceph/ceph — pull request #352 by liewegas (2013-06-08 00:20:07+00:00)
Title: mds: do not double-queue file recovery in eval_gather

This fixes a specific case of double-queuing seen in #4832:

- client goes stale, inode marked NEEDSRECOVER
- eval does sync, queued, -> RECOVERING
- client resumes
- client goes stale (again), inode marked NEEDSRECOVER
- eval_gather queues *again*

Note that a cursory look at the recovery code makes me think this needs
a much more serious overhaul. In particular, I don't think we should
be triggering recovery when transitioning *from* a stable state, but
explicitly when we are flagged, or when gathering. We should probably
also hold a wrlock over the recovery period and remove the force_wrlock
kludge from the final size check. Opened ticket #5268.

Signed-off-by: Sage Weil