Skip to content

Commit 8f2ee22

Browse files
committed
osd/SnapMapper: fix _lookup_purged_snap
We should verify that the snap we are looking for matches the pool also. Same as we are checking in OSDMonitor: ceph@0a48392 Fixes: https://tracker.ceph.com/issues/64347 Signed-off-by: Matan Breizman <[email protected]>
1 parent f912e90 commit 8f2ee22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/osd/SnapMapper.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,10 @@ int SnapMapper::_lookup_purged_snap(
764764
decode(gotpool, p);
765765
decode(*begin, p);
766766
decode(*end, p);
767+
if (gotpool != pool) {
768+
dout(20) << __func__ << " got wrong pool " << gotpool << dendl;
769+
return -ENOENT;
770+
}
767771
if (snap < *begin || snap >= *end) {
768772
dout(20) << __func__ << " pool " << pool << " snap " << snap
769773
<< " found [" << *begin << "," << *end << "), no overlap" << dendl;

0 commit comments

Comments
 (0)