From: Sage Weil Date: Tue, 1 May 2018 17:51:55 +0000 (-0500) Subject: mon/OSDMonitor: set FLAG_SELFMANAGED_SNAPS on cephfs snap removal X-Git-Tag: v13.1.0~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21756%2Fhead;p=ceph.git mon/OSDMonitor: set FLAG_SELFMANAGED_SNAPS on cephfs snap removal CephFS uses a different path to remove selfmanaged snaps than librados, so while the librados path goes through pg_pool_t::remove_unmanaged_snap(), we open code the snap addition to the pool's removed_snaps here. If we don't set FLAG_SELFMANAGED_SNAPS at that time, we will implicitly set it during decode and get a CRC mismatch. Fix by explicitly setting FLAG_SELFMANAGED_SNAPS flag here. Fixes: http://tracker.ceph.com/issues/23949 Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 14082e4c5e8b..8b949ca4b2eb 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3278,6 +3278,7 @@ bool OSDMonitor::prepare_remove_snaps(MonOpRequestRef op) !pending_inc.new_pools[p->first].removed_snaps.contains(*q))) { pg_pool_t *newpi = pending_inc.get_new_pool(p->first, &pi); newpi->removed_snaps.insert(*q); + newpi->flags |= pg_pool_t::FLAG_SELFMANAGED_SNAPS; dout(10) << " pool " << p->first << " removed_snaps added " << *q << " (now " << newpi->removed_snaps << ")" << dendl; if (*q > newpi->get_snap_seq()) {