Merge "Handle virtio in private fs mapping" am: e471d11d46
Change-Id: If088b875ff4cbca66fe9c6f9224b437edc85dae8
diff --git a/model/PrivateVolume.cpp b/model/PrivateVolume.cpp
index fd3daea..ba221a4 100644
--- a/model/PrivateVolume.cpp
+++ b/model/PrivateVolume.cpp
@@ -38,6 +38,7 @@
#include <sys/wait.h>
using android::base::StringPrintf;
+using android::vold::IsVirtioBlkDevice;
namespace android {
namespace vold {
@@ -178,7 +179,8 @@
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.
- if ((major(mRawDevice) == kMajorBlockMmc) && f2fs::IsSupported()) {
+ if ((major(mRawDevice) == kMajorBlockMmc ||
+ IsVirtioBlkDevice(major(mRawDevice))) && f2fs::IsSupported()) {
resolvedFsType = "f2fs";
} else {
resolvedFsType = "ext4";