~/bend-docscommunity

src/disk/access.bend checks

raw source on the hub · import 0xd595fdc5ca98e64512c8df6e3130c270/src/disk/access.bend as Access

1 import
import Base

Types

type Use source · line 30 · raw

Data

How an image is opened for each use, as flags for Hvf.disk_open_with: 1 read only, 2 an exclusive lock (else a shared one), 4 a regular file only. A disk the guest writes is opened read-write and locked exclusively, so a second bend-vmm can neither write nor read it (two writers corrupt a qcow2 image at once); a :ro disk only reads, with a shared lock beside other readers; a qcow2 image's backing file, named inside the image, only reads, shared, and must be a regular file (never a device or a FIFO the image points at).

Definitions

def Access.eperm source · line 10 · raw

U32

def Access.eacces source · line 13 · raw

U32

def Access.erofs source · line 16 · raw

U32

def Access.fallback source · line 19 · raw

@+errno:U32 -> Bool

def Access.flags source · line 35 · raw

@u:Use -> U32

def Access.use source · line 44 · raw

@ro:Bool -> Use