]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: check that source OSD is valid for MOSDRepScrub 3947/head
authorSage Weil <sage@redhat.com>
Sat, 13 Dec 2014 16:06:31 +0000 (08:06 -0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 11 Mar 2015 15:57:58 +0000 (16:57 +0100)
commiteb03e792040bd22c1ae8b7dd73d94fbfd6208eec
treeb36eb2fb042ac7278a23396e70ac007330ff3ecd
parentae18707b3caa115dc510aff38b77f8afe8555c61
osd: check that source OSD is valid for MOSDRepScrub

Make sure the message we got from the peer OSD is valid.  Specifically,
this avoids a race like this:

- A marks down B
- B sends MOSDRepScrub
- A accepts connection from B as new
- A replies to scrub
- B crashes because msgr seq 1 < expected seq 1000+

See #8880 for the most recent fix for requests.

Fixes: #9555
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 847e5e102522d651aa9687a54aaafcebf3afc596)

Conflicts:
    src/osd/OSD.cc: require functions first argument is now a reference
src/osd/OSD.cc