]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap: stop encoding osd_state with >8 bits wide states only for old client 33814/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 9 Mar 2020 05:52:51 +0000 (13:52 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 9 Mar 2020 06:28:10 +0000 (14:28 +0800)
commit054bcb934f9ee881f2afc538eeaa80931a03ffd6
tree287ef15b06002418bed2e32aed610126ca643670
parent78b24f5783edc64ab301ad77667008aba89a7051
osd/OSDMap: stop encoding osd_state with >8 bits wide states only for old client

In a8fb39b5 we extended Incremental's new_state to 32 bits wide
instead of 8. However, if we intend to flip those > 8 bits wide flags
only (e.g., the per-osd CEPH_OSD_NOOUT/NOIN flag), we'll end
up encoding a zeroed new_state into the Incremental map, which'll
be mis-interpreted as osd-down by old clients.

Fix by skipping encoding osd_states with the extended(> 256) flags
only. They simply can not be understood by those clients and will
get ignored anyway.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSDMap.cc