[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd |
Date: |
Wed, 23 Nov 2011 10:56:09 +0000 |
On Wed, Nov 23, 2011 at 10:14 AM, Chunyan Liu <address@hidden> wrote:
> V3:
> Remove file lock in main().
> Try to find new free nbd device and connect to it if connecting to the first
> first found free nbd device failed.
>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
> qemu-nbd.c | 80
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 79 insertions(+), 1 deletions(-)
I not seeing the part where you adjusted the ioctl order.
The /proc/partitions scanning is unnecessary since we can just loop
over /dev/ndb%d and try to initialize. If a device is in use then
init will fail and we need to try the next one. If a device is free
we can continue with normal operation. I guess I'm saying that once
you fix the ioctl order then there's no need for another mechanism to
test whether or not a device is in use.
Also please use QEMU coding style, you can run
qemu/scripts/checkpatch.pl on your patches.
Stefan
- [Qemu-devel] [PATCH V3 1/2] Update ioctl order in nbd_init to detect -EBUSY, Chunyan Liu, 2011/11/23
- [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Chunyan Liu, 2011/11/23
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Stefan Hajnoczi, 2011/11/23
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Chunyan Liu, 2011/11/23
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Stefan Hajnoczi, 2011/11/24
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Chunyan Liu, 2011/11/25
- Re: [Qemu-devel] [PATCH V3 2/2] Add -f option to qemu-nbd, Stefan Hajnoczi, 2011/11/29