Fix the DM Table load fail situation 20/113120/1
authorSeok Hong <seok85.hong@samsung.com>
Mon, 6 Feb 2017 07:11:57 +0000 (16:11 +0900)
committerSeok Hong <seok85.hong@samsung.com>
Mon, 6 Feb 2017 07:13:16 +0000 (16:13 +0900)
Force filesystem check via fsck can avoid the DM Table load fail situation.

Change-Id: I0316a50b02603ee6c20ade534d606b375858d064
Signed-off-by: Seok Hong <seok85.hong@samsung.com>
server/engine/dmcrypt-engine.cpp

index 27d4075..8152d76 100644 (file)
@@ -279,6 +279,7 @@ void DMCryptEngine::encryptInPlace(const std::string &src_blkdev,
                                                                   const bool isFastEncEnabled)
 {
        Ext4Tool ext4tool(src_blkdev);
+       ext4tool.forceCleanUp();
 
        const unsigned int SRC_BLOCK_SIZE = ext4tool.getBlockSize();
        const unsigned int SRC_TOTAL_BLOCK_COUNT = ext4tool.getTotalBlockCount();