Skip to the content.

https://www.linux-kvm.org/images/b/b5/2012-fourm-block-overview.pdf

On the command line: -hda test.img …is a shortcut for… -drive file=test.img,if=ide,cache=writeback,aio=threads …is a shortcut for… -drive file=test.img,id=ide0-hd0,if=none,cache=writeback,aio=threads -device ide-drive,bus=ide.0,drive=ide0-hd0

SCSI passthrough

VMDK, VHD, VDI…

External snapshots (backing files): – base – sn1 – sn2 – sn3

Internal snapshots (savevm/loadvm, qcow2 only):

image streaing Use cases:

http://events17.linuxfoundation.org/sites/events/files/slides/talk_11.pdf

总是如此,直接穿过这里的:

源码分析

调用 BlockDriver:: bdrv_co_preadv_part / bdrv_co_preadv / bdrv_aio_preadv / bdrv_co_readv 在 bdrv_driver_preadv 中,这个是有优先级的。

使用 block layer 作为例子

typedef struct NvmeRequest {
    struct NvmeSQueue       *sq;
    struct NvmeNamespace    *ns;
    BlockAIOCB              *aiocb; // 就是逐个位置了
    uint16_t                status;
    void                    *opaque;
    NvmeCqe                 cqe;
    NvmeCmd                 cmd;
    BlockAcctCookie         acct;
    NvmeSg                  sg;
    QTAILQ_ENTRY(NvmeRequest)entry;
} NvmeRequest;

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。