]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: mkfs need wait for transcation completely finish 43417/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:04:36 +0000 (11:04 +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 fbf1d51895452a35b6caaed08b14953900e8c004..8dceddae384c4614adeccdb83057f7ce3c9070f6 100644 (file)
@@ -2101,6 +2101,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);