qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd
Date: Fri, 18 Nov 2011 09:59:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 11/18/2011 02:25 AM, Chun Yan Liu wrote:
Yes. I have tested using same device twice as described in my previous
mail. Without lock:

If issuing "qemu-nbd -c /dev/nbd0 disk.img" and "qemu-nbd -c  /dev/nbd0
disk1.img" almost at the same time, both can pass nbd_init() and get to
nbd_client(), then the latter one will fail and exit, but the first one
does not work well either (fail to show partitions.) That's why I think
we should add a lock in an earlier time.

This is an initialization problem. As Stefan wrote, functionality for atomic acquisition of NBD devices is provided by the kernel; the problem is simply that QEMU does not use it. :)

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]