]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: mkfs need wait for transcation completely finish 41889/head
authorChen Fan <fan.chen@easystack.cn>
Wed, 9 Jun 2021 05:29:03 +0000 (13:29 +0800)
committerChen Fan <fan.chen@easystack.cn>
Sun, 20 Jun 2021 16:11:20 +0000 (00:11 +0800)
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>
src/osd/OSD.cc

index bfe4456be256d51f944d7f8e3e16d5a65492a7e9..662944029aa6a547aa3692621f967c2a57f03fba 100644 (file)
@@ -2142,6 +2142,7 @@ int OSD::mkfs(CephContext *cct,
           << "queue_transaction returned " << cpp_strerror(ret) << dendl;
       return ret;
     }
+    ch->flush();
   }
 
   ret = write_meta(cct, store.get(), sb.cluster_fsid, sb.osd_fsid, whoami, osdspec_affinity);