From: Igor Fedotov Date: Tue, 27 Nov 2018 11:39:09 +0000 (+0300) Subject: osd/OSD: OSD::mkfs asserts when reusing disk with existing superblock. X-Git-Tag: v14.1.0~745^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=328ab2d9f0a27aa38d153469f8ed11e21a6c3ae8;p=ceph.git osd/OSD: OSD::mkfs asserts when reusing disk with existing superblock. Fixes: http://tracker.ceph.com/issues/37404 Signed-off-by: Igor Fedotov --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9b3a7a361040..18c183222ee3 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1935,6 +1935,9 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, uuid_d fsid, int whoami) } umount_store: + if (ch) { + ch.reset(); + } store->umount(); free_store: delete store;