Add support for checkpointing

Checkpointing uses a combination of files on the meta partition
and the checkpoint= fs_mgr flag. Checkpointed partitions will
revert to their starting state on reboot unless checkpoint commit
is called.

Test: Run vdc commands, check file on metadata
Merged-In: Icba16578608a6cbf922472e9d4ae5b8cf5f016c6
Change-Id: Icba16578608a6cbf922472e9d4ae5b8cf5f016c6
diff --git a/MetadataCrypt.cpp b/MetadataCrypt.cpp
index 842b19b..6edc0a4 100644
--- a/MetadataCrypt.cpp
+++ b/MetadataCrypt.cpp
@@ -36,6 +36,7 @@
 #include <cutils/fs.h>
 #include <fs_mgr.h>
 
+#include "Checkpoint.h"
 #include "EncryptInplace.h"
 #include "KeyStorage.h"
 #include "KeyUtil.h"
@@ -59,7 +60,8 @@
         return false;
     }
     auto mount_rc = fs_mgr_do_mount(fstab_default, const_cast<char*>(mount_point),
-                                    const_cast<char*>(blk_device), nullptr);
+                                    const_cast<char*>(blk_device), nullptr,
+                                    android::vold::cp_needsCheckpoint());
     if (setexeccon(nullptr)) {
         PLOG(ERROR) << "Failed to clear setexeccon";
         return false;