summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/init-startup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
index bf1acf29..ff57db38 100644
--- a/libdiskfs/init-startup.c
+++ b/libdiskfs/init-startup.c
@@ -148,6 +148,13 @@ diskfs_S_startup_dosync (mach_port_t handle)
diskfs_set_hypermetadata (1, 1);
_diskfs_diskdirty = 0;
+ /* XXX: if some application writes something after that, we will
+ * crash. That is still better than creating pending writes before
+ * poweroff, and thus fsck on next reboot.
+ */
+ diskfs_readonly = 1;
+ diskfs_readonly_changed (1);
+
ports_resume_class_rpcs (diskfs_protid_class);
}