]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: catch duplicates in DamageTable 11412/head
authorJohn Spray <john.spray@redhat.com>
Mon, 19 Sep 2016 14:18:24 +0000 (15:18 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 11 Oct 2016 08:34:13 +0000 (10:34 +0200)
commit3320da0adb346af15a5d50a45e0aea5ca234eb79
tree61a9ae367991ed6c2e958828a5886dccda0317dd
parent2a348d23e5a047bf6a9c80140cf31ba2d6d4113f
mds: catch duplicates in DamageTable

There was an implicit assumption in the code that callers
wouldn't hit the notify_*damaged paths twice because they would
have checked is_*_damaged paths first.

However, that's not really true in all cases, e.g. scrub
code isn't required to respect existing damage entries
when trying to load a CDir.

Simply fix this by having the DamageTable notify* functions
check the key they're inserting doesn't already exist.

Fixes: http://tracker.ceph.com/issues/17173
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit c9cfaef104e9aaefad55583d7e54f8b4665904b3)
src/mds/DamageTable.cc