diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-07-31 01:08:59 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-07-31 01:08:59 +0000 |
commit | 9507248cf5cef4e1572d1e16d17ff382d7ace87b (patch) | |
tree | fa81e1dd198e35dacf5831b11ba0928a6ef7bf38 | |
parent | a574afacda038936cb9e62d84c7eebec893aeb5d (diff) | |
parent | b87b3d64e0077dc3699b0b47ae20749237f4c2aa (diff) | |
download | vold-pie-dr1-release.tar.gz |
Merge cherrypicks of [4658485, 4658486, 4658487, 4657188, 4657275, 4659124, 4659125, 4659141, 4659142, 4659143, 4657276, 4657814, 4658660, 4657277, 4657815, 4657278, 4659144, 4658126, 4658127, 4658128, 4658129, 4658130, 4658131, 4658132, 4658133, 4658134, 4658135, 4658136, 4658137, 4658138, 4659161, 4659162, 4659163, 4659164, 4659145, 4659146, 4659147, 4659148, 4657655, 4657656, 4658139, 4658140, 4659181, 4659182, 4659183, 4657130, 4657131, 4657132, 4657133, 4659165, 4659166, 4659167, 4657657, 4657279, 4659149] into pi-dr1-releaseandroid-9.0.0_r12android-9.0.0_r11pie-dr1-release
Change-Id: I4ec89f9bba4e4dab9da70e81736388624ca3955a
-rw-r--r-- | IdleMaint.cpp | 8 | ||||
-rw-r--r-- | model/PrivateVolume.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/IdleMaint.cpp b/IdleMaint.cpp index 7744024a..5a19b8c1 100644 --- a/IdleMaint.cpp +++ b/IdleMaint.cpp @@ -15,6 +15,7 @@ */ #include "IdleMaint.h" +#include "FileDeviceUtils.h" #include "Utils.h" #include "VolumeManager.h" #include "model/PrivateVolume.h" @@ -85,8 +86,8 @@ static void addFromVolumeManager(std::list<std::string>* paths, } else if (path_type == PathTypes::kBlkDevice) { std::string gc_path; const std::string& fs_type = vol->getFsType(); - if (fs_type == "f2fs" && - Realpath(vol->getRawDevPath(), &gc_path)) { + if (fs_type == "f2fs" && (Realpath(vol->getRawDmDevPath(), &gc_path) || + Realpath(vol->getRawDevPath(), &gc_path))) { paths->push_back(std::string("/sys/fs/") + fs_type + "/" + Basename(gc_path)); } @@ -130,7 +131,8 @@ static void addFromFstab(std::list<std::string>* paths, PathTypes path_type) { } else if (path_type == PathTypes::kBlkDevice) { std::string gc_path; if (std::string(fstab->recs[i].fs_type) == "f2fs" && - Realpath(fstab->recs[i].blk_device, &gc_path)) { + Realpath(android::vold::BlockDeviceForPath( + std::string(fstab->recs[i].mount_point) + "/"), &gc_path)) { paths->push_back(std::string("/sys/fs/") + fstab->recs[i].fs_type + "/" + Basename(gc_path)); } diff --git a/model/PrivateVolume.h b/model/PrivateVolume.h index 95086713..9a61f8dc 100644 --- a/model/PrivateVolume.h +++ b/model/PrivateVolume.h @@ -41,6 +41,7 @@ public: virtual ~PrivateVolume(); const std::string& getFsType() { return mFsType; }; const std::string& getRawDevPath() { return mRawDevPath; }; + const std::string& getRawDmDevPath() { return mDmDevPath; }; protected: status_t doCreate() override; |