Skip to content

Commit dba42a3

Browse files
hiroTamadaclaude
andcommitted
feat: replace polling with channel-based notifications and default to erofs
Replace the 500ms polling loop in waitForImageReady() with a channel-based pub/sub notification system on the image manager, reducing build-to-SSE lag. Switch the default image format from ext4 to erofs (LZ4-compressed read-only filesystem) for faster, smaller rootfs images. The VM init mounts erofs first with an ext4 fallback for backward compatibility with legacy images. Log which filesystem type (erofs or ext4) was actually mounted so operators can verify erofs is being used and diagnose fallback scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d5a8b94 commit dba42a3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/system/init/mount.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,14 @@ func setupOverlay(log *Logger) error {
108108
// Mount readonly rootfs from /dev/vda
109109
// Try erofs first (new default), fall back to ext4 (legacy images)
110110
if err := mount("/dev/vda", "/lower", "erofs", "ro"); err != nil {
111+
log.Info("hypeman-init:overlay", "erofs mount failed, trying ext4: "+err.Error())
111112
if err := mount("/dev/vda", "/lower", "ext4", "ro"); err != nil {
112113
return fmt.Errorf("mount rootfs: %w", err)
113114
}
115+
log.Info("hypeman-init:overlay", "mounted rootfs from /dev/vda (ext4 fallback)")
116+
} else {
117+
log.Info("hypeman-init:overlay", "mounted rootfs from /dev/vda (erofs)")
114118
}
115-
log.Info("hypeman-init:overlay", "mounted rootfs from /dev/vda")
116119

117120
// Mount writable overlay disk from /dev/vdb
118121
if err := mount("/dev/vdb", "/overlay", "ext4", ""); err != nil {

0 commit comments

Comments
 (0)