From 1124839204e5a694d33e6315aee58f75113401c5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 1 May 2018 12:51:55 -0500 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 14082e4c5e8b0..8b949ca4b2eb2 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()) { -- 2.39.5