]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: do not double-queue file recovery in eval_gather
authorSage Weil <sage@inktank.com>
Fri, 7 Jun 2013 04:38:56 +0000 (21:38 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 9 Oct 2013 20:47:07 +0000 (13:47 -0700)
commitffdc7fce132b3b98463b4222d2c51ccef6b94d82
tree7e7664181ab87114d2b50bfe13c3cb3ec65f0675
parent60033c31381d36cbbc6c873d7055cbe735f5deb2
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 <sage@inktank.com>
(cherry picked from commit a08d62045657713bf0a5372bf14136082ec3b17e)
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/Locker.cc