diff options
author | Martijn Coenen <maco@google.com> | 2020-10-12 18:07:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-10-12 18:07:39 +0000 |
commit | e9023dc7bb621e4edd5b02cdf58f98579ebcd8f7 (patch) | |
tree | fe1a60d33500e7048d251ac96f415d2fbd5866e3 | |
parent | dd66de13ea0461e133070d2a09a7befdd576f427 (diff) | |
parent | e0c38eba262a9c92dc5579b11ed446e7097f16f8 (diff) | |
download | vold-e9023dc7bb621e4edd5b02cdf58f98579ebcd8f7.tar.gz |
Merge "Use dm.CreateDevice() with a timeout."
-rw-r--r-- | MetadataCrypt.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/MetadataCrypt.cpp b/MetadataCrypt.cpp index c61132c8..4b613738 100644 --- a/MetadataCrypt.cpp +++ b/MetadataCrypt.cpp @@ -216,7 +216,7 @@ static bool create_crypto_blk_dev(const std::string& dm_name, const std::string& auto& dm = DeviceMapper::Instance(); for (int i = 0;; i++) { - if (dm.CreateDevice(dm_name, table)) { + if (dm.CreateDevice(dm_name, table, crypto_blkdev, std::chrono::seconds(5))) { break; } if (i + 1 >= TABLE_LOAD_RETRIES) { @@ -227,10 +227,6 @@ static bool create_crypto_blk_dev(const std::string& dm_name, const std::string& usleep(500000); } - if (!dm.GetDmDevicePathByName(dm_name, crypto_blkdev)) { - LOG(ERROR) << "Cannot retrieve default-key device status " << dm_name; - return false; - } return true; } |