Home
last modified time | relevance | path

Searched hist:e971aa12739f269d6fbfaeabdd4acaeb0f15960b (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/
H A Dblock.cdiff e971aa12739f269d6fbfaeabdd4acaeb0f15960b Thu Sep 20 14:13:19 CDT 2012 Jeff Cody <jcody@redhat.com> block: Framework for reopening files safely

This is based on Supriya Kannery's bdrv_reopen() patch series.

This provides a transactional method to reopen multiple
images files safely.

Image files are queue for reopen via bdrv_reopen_queue(), and the
reopen occurs when bdrv_reopen_multiple() is called. Changes are
staged in bdrv_reopen_prepare() and in the equivalent driver level
functions. If any of the staged images fails a prepare, then all
of the images left untouched, and the staged changes for each image
abandoned.

Block drivers are passed a reopen state structure, that contains:
* BDS to reopen
* flags for the reopen
* opaque pointer for any driver-specific data that needs to be
persistent from _prepare to _commit/_abort
* reopen queue pointer, if the driver needs to queue additional
BDS for a reopen

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>