aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-05-12 04:32:14 -0700
committerAndroid Code Review <code-review@android.com>2011-05-12 04:32:14 -0700
commitbfe866d6a49a98afaf647ef912ceda47e9ec92f7 (patch)
tree0e0c910a6bb05edc2417c41da3ce5b29eeb9d4a3 /vl-android.c
parentb9697ca80a8403f2cc07de010511510fdaa87315 (diff)
parent8fc3e6effd925b9ebe39268c6ccbf9e8730ef3d4 (diff)
downloadexternal_qemu-bfe866d6a49a98afaf647ef912ceda47e9ec92f7.zip
external_qemu-bfe866d6a49a98afaf647ef912ceda47e9ec92f7.tar.gz
external_qemu-bfe866d6a49a98afaf647ef912ceda47e9ec92f7.tar.bz2
Merge "Fix SDCard speed issues too."
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/vl-android.c b/vl-android.c
index a1b88be..2e1f0f9 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -5079,6 +5079,13 @@ int main(int argc, char **argv, char **envp)
} else {
/* Successful locking */
hda_opts = drive_add(sdPath, HD_ALIAS, 0);
+ /* Set this property of any operation involving the SD Card
+ * will be x100 slower, due to the corresponding file being
+ * mounted as O_DIRECT. Note that this is only 'unsafe' in
+ * the context of an emulator crash. The data is already
+ * synced properly when the emulator exits (either normally or through ^C).
+ */
+ qemu_opt_set(hda_opts, "cache", "unsafe");
}
}
}
@@ -5093,10 +5100,7 @@ int main(int argc, char **argv, char **envp)
PANIC("Snapshot storage already in use: %s", spath);
}
hdb_opts = drive_add(spath, HD_ALIAS, 1);
- /* VERY IMPORTANT:
- * Set this property or the file will be mounted with O_DIRECT,
- * which will slow down snapshot saving x100 !
- */
+ /* See comment above to understand why this is needed. */
qemu_opt_set(hdb_opts, "cache", "unsafe");
}
}