diff options
author | John Spray <john.spray@redhat.com> | 2015-09-29 23:45:03 +0200 |
---|---|---|
committer | John Spray <john.spray@redhat.com> | 2015-09-30 14:11:16 +0200 |
commit | 04c09ac62f21f59f9db68fedc5ca78df27030d9f (patch) | |
tree | d1d5199b156de5f7f2ae09cb1602bc8d77ad3b77 | |
parent | Merge branch 'wip-12983' of git://github.com/dzafman/ceph into infernalis (diff) | |
download | ceph-04c09ac62f21f59f9db68fedc5ca78df27030d9f.tar.xz ceph-04c09ac62f21f59f9db68fedc5ca78df27030d9f.zip |
mds: fix SnapServer crash on deleted pool
Signed-off-by: John Spray <john.spray@redhat.com>
-rw-r--r-- | src/mds/SnapServer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mds/SnapServer.cc b/src/mds/SnapServer.cc index b5884fab7dc..70069092c41 100644 --- a/src/mds/SnapServer.cc +++ b/src/mds/SnapServer.cc @@ -265,6 +265,12 @@ void SnapServer::check_osd_map(bool force) ++p) { int id = p->first; const pg_pool_t *pi = osdmap->get_pg_pool(id); + if (pi == NULL) { + // The pool is gone. So are the snapshots. + all_purged[id] = std::vector<snapid_t>(p->second.begin(), p->second.end()); + continue; + } + for (set<snapid_t>::iterator q = p->second.begin(); q != p->second.end(); ++q) { |