Skip to content

Commit 01b0d6e

Browse files
committed
osctld: remount datasets on container stop
This is a partial workaround for openzfs/zfs#16817. Unmounting datasets will sync dirtied pages to disk.
1 parent 1187c71 commit 01b0d6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

osctld/lib/osctld/console/console.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def handle_ct_stop(ctrc)
100100
GarbageCollector.free_container_run_dataset(ctrc, ctrc.dataset)
101101
end
102102

103+
unless ct.ephemeral?
104+
# Force write-out of dirtied pages
105+
ct.unmount
106+
ct.mount
107+
end
108+
103109
ctrc.fulfil_exit
104110

105111
if ctrc.reboot?

0 commit comments

Comments
 (0)