]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: catch duplicates in DamageTable 11137/head
authorJohn Spray <john.spray@redhat.com>
Mon, 19 Sep 2016 14:18:24 +0000 (15:18 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 19 Sep 2016 14:21:37 +0000 (15:21 +0100)
commitc9cfaef104e9aaefad55583d7e54f8b4665904b3
tree893bac46a2ade0ef2c1ef935238236259cd6387b
parent22053d057fb03e9c932da2771d7c90556567d1e4
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>
src/mds/DamageTable.cc