Am 19.07.2013 um 08:29 hat Wenchao Xia geschrieben:
> 于 2013-7-17 22:23, Eric Blake 写道:
> >On 07/17/2013 08:03 AM, Wenchao Xia wrote:
> >>This series allow user to read internal snapshot's contents without qemu-img
> >>convert. Another purpose is that, when qemu is online and have taken an
> >>internal snapshot, let user invoke qemu-nbd to do any thing on it except 
> >>write.
> >>
> >>This brings two interesting issues:
> >>1 is it safe to let qemu-nbd and qemu access that file at same time?
> >
> >Probably not, for the same reason we tell people to not use qemu-img
> >while qemu is active on a file.
> >
>   For external case, or backing chain, qemu-nbd export while qemu is
> active, do you think it is OK?
> 
> base->imageA
> 
> qemu-nbd export base
> qemu use imageA.

It depends. If you use 'qemu-nbd -r' to export it, it's okay.  The
reason is that it's allowed to have either one process opening the file
read-write, or an arbitrary number of processes opening the file
read-only. In the case of qemu using imageA, base is only opened
read-only, so qemu-nbd can be another read-only user.

Kevin

Reply via email to