]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: mkfs need wait for transcation completely finish 43418/head
authorChen Fan <fan.chen@easystack.cn>
Wed, 9 Jun 2021 05:29:03 +0000 (13:29 +0800)
committerMykola Golub <mgolub@suse.com>
Tue, 5 Oct 2021 08:05:31 +0000 (11:05 +0300)
when do ceph-osd mkfs, when ceph-osd process exit, sometimes
the block data could be written incompletely. we need add
wait for it complete.

Signed-off-by: Chen Fan <fan.chen@easystack.cn>
(cherry picked from commit 0ffadad3a83b3ca634d7d58a80c84d1d8761e2ea)

src/osd/OSD.cc

index b56c41a4334da26fda0255837283ab159c312448..c42fd05bedf01f02f31302f8c5e2c42b5534b196 100644 (file)
@@ -1989,6 +1989,7 @@ int OSD::mkfs(CephContext *cct, ObjectStore *store, uuid_d fsid, int whoami, str
           << "queue_transaction returned " << cpp_strerror(ret) << dendl;
       goto umount_store;
     }
+    ch->flush();
   }
 
   ret = write_meta(cct, store, sb.cluster_fsid, sb.osd_fsid, whoami, osdspec_affinity);