Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: catch duplicates in DamageTable #11137

Merged
merged 1 commit into from Sep 29, 2016
Merged

mds: catch duplicates in DamageTable #11137

merged 1 commit into from Sep 29, 2016

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Sep 19, 2016

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

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>
@jcsp jcsp added bug-fix cephfs Ceph File System labels Sep 19, 2016
@jcsp
Copy link
Contributor Author

jcsp commented Sep 23, 2016

@fullerdj quick review please?

@fullerdj
Copy link
Contributor

Looks good to me.

@fullerdj fullerdj assigned jcsp and unassigned fullerdj Sep 28, 2016
@jcsp jcsp merged commit 2715885 into ceph:master Sep 29, 2016
@jcsp jcsp deleted the wip-17173 branch September 29, 2016 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
2 participants