fix(runtime): make Copy to RAM switch live backing

This commit is contained in:
Mikhail Chusavitin
2026-09-03 10:47:15 +03:00
parent 347bc8310a
commit b1ab866f58
7 changed files with 150 additions and 111 deletions
@@ -7,7 +7,9 @@ import (
"syscall"
)
const ioctlLoopChangeFD = 0x4C08
// LOOP_CHANGE_FD from <linux/loop.h>. 0x4C08 is LOOP_SET_DIRECT_IO and was
// the reason every runtime Copy to RAM attempt ended in EINVAL.
const ioctlLoopChangeFD = 0x4C06
func loopChangeFD(loopDev, newFile string) error {
lf, err := os.OpenFile(loopDev, os.O_RDWR, 0)