]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix segfault on EOPNOTSUPP returned while fetching snapshot timestamp 13287/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Tue, 7 Feb 2017 03:16:11 +0000 (11:16 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Tue, 7 Feb 2017 03:34:54 +0000 (11:34 +0800)
Fixes: http://tracker.ceph.com/issues/18839
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
src/librbd/image/RefreshRequest.cc

index 16a76def4e3bb7b42bedfc95ac33fbbdf73b4d35..dabd094c6e947ac97d650d3043bb49dd752c29d0 100644 (file)
@@ -474,6 +474,7 @@ Context *RefreshRequest<I>::handle_v2_get_snap_timestamps(int *result) {
     send_v2_get_mutable_metadata();
     return nullptr;
   } else if (*result == -EOPNOTSUPP) {
+    m_snap_timestamps = std::vector<utime_t>(m_snap_names.size(), utime_t());
     // Ignore it means no snap timestamps are available
   } else if (*result < 0) {
     lderr(cct) << "failed to retrieve snapshots: " << cpp_strerror(*result)