void DirBackendFixedSize::SwitchSubsessionAway (const fs::path& subsession_path) const
{
- /* Keep session mounted during switch to reuse it if another switch happen.
- * Addionally, it leaves subsession in same state as if sessiond would be restarted */
- if (getenv("SESSIOND_NO_KEEP_SESSION_MOUNTS")) {
+#ifdef SESSIOND_UNMOUNT_SESSION_ON_SWITCH
LOGI("Unmouting session image at %s", subsession_path.c_str());
OS::do_umount(subsession_path);
- } else
+#else
+ /* By default, keep subsession mounted for reuse in case it is switched to again.
+ * Addionally, this leaves subsession in the same state across sessiond restarts. */
LOGI("Switching away from subsession but keeping image mounted at %s", subsession_path.c_str());
+#endif
}
void DirBackendFixedSize::SwitchSubsessionInto (const fs::path& subsession_path) const