Merge "Handle virtio in private fs mapping" into rvc-dev am: 0d1fcb90d6

Change-Id: I11bc694a26676dd9f8b0fda7f2078a9bc6ed8719
gugelfrei
TreeHugger Robot 4 years ago committed by Automerger Merge Worker
commit 34d72f126b

@ -39,6 +39,7 @@
#include <thread>
using android::base::StringPrintf;
using android::vold::IsVirtioBlkDevice;
namespace android {
namespace vold {
@ -210,9 +211,10 @@ status_t PrivateVolume::doFormat(const std::string& fsType) {
if (fsType == "auto") {
// For now, assume that all MMC devices are flash-based SD cards, and
// give everyone else ext4 because sysfs rotational isn't reliable.
// Additionally, prefer f2fs for loop-bases devices
if ((major(mRawDevice) == kMajorBlockMmc || major(mRawDevice) == kMajorBlockLoop) &&
f2fs::IsSupported()) {
// Additionally, prefer f2fs for loop-based devices
if ((major(mRawDevice) == kMajorBlockMmc ||
major(mRawDevice) == kMajorBlockLoop ||
IsVirtioBlkDevice(major(mRawDevice))) && f2fs::IsSupported()) {
resolvedFsType = "f2fs";
} else {
resolvedFsType = "ext4";

Loading…
Cancel
Save