Wait for dm device to be ready before format

It can sometimes take a moment for the dm-device to appear after
creation, causing operations on it such as formatting to fail.
Ensure the device exists before create_crypto_blk_dev returns.

Test: adb sm set-virtual-disk true and format as adoptable.
Bug: 117586466
Change-Id: Id8f571b551f50fc759e78d917e4ac3080e926722
diff --git a/Utils.h b/Utils.h
index b097625..e6f4792 100644
--- a/Utils.h
+++ b/Utils.h
@@ -24,6 +24,7 @@
 #include <selinux/selinux.h>
 #include <utils/Errors.h>
 
+#include <chrono>
 #include <string>
 #include <vector>
 
@@ -134,6 +135,8 @@
 
 status_t DeleteDirContentsAndDir(const std::string& pathname);
 
+status_t WaitForFile(const char* filename, std::chrono::nanoseconds timeout);
+
 }  // namespace vold
 }  // namespace android