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

Change-Id: I9ef2acf09fe51567184ec9aee508c98170424d96
diff --git a/model/PrivateVolume.cpp b/model/PrivateVolume.cpp
index e146633..39a946c 100644
--- a/model/PrivateVolume.cpp
+++ b/model/PrivateVolume.cpp
@@ -39,6 +39,7 @@
 #include <thread>
 
 using android::base::StringPrintf;
+using android::vold::IsVirtioBlkDevice;
 
 namespace android {
 namespace vold {
@@ -210,9 +211,10 @@
     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";