• Pavel Emelyanov's avatar
    img: Introduce the struct cr_img · 295090c1
    Pavel Emelyanov authored
    We want to have buffered images to speed up dump and,
    slightly, restore. Right now we use plan file descriptors
    to write and read images to/from. Making them buffered
    cannot be gracefully done on plain fds, so introduce
    a new class.
    
    This will also help if (when?) we will want to do more
    complex changes with images, e.g. store them all in one
    file or send them directly to the network.
    
    For now the cr_img just contains one int _fd variable.
    
    This patch chages the prototype of open_image() to
    return struct cr_img *, pb_(read|write)* to accept one
    and fixes the compilation of the rest of the code :)
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    295090c1
fifo.c 3.94 KB