qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] NBD block device backend - 'improvements'


From: Nicholas Thomas
Subject: [Qemu-devel] NBD block device backend - 'improvements'
Date: Mon, 14 Feb 2011 19:40:22 +0000

[Apologies for the cross-post - I originally sent this to the KVM ML -
obviously, it's far more appropriate here]

Hi,

I've been doing some work with /block/nbd.c with the aim of improving
its behaviour when the NBD server is inaccessible or goes away.

Current behaviour is to exit on startup if connecting to the NBD server
fails for any reason. If the connection dies  once KVM is started, the
VM stays up but reads and writes fail. No attempt to re-establish the
connection is made. 

I've written a patch that changes the behaviour - instead of exiting at
startup, we wait for the NBD connection to be established, and we hang
on reads and writes until the connection is re-established.

I'm interested in getting the changes merged upstream, so I thought I'd
get in early and ask if you'd be interested in the patch, in principle;
whether the old behaviour would need to be preserved, making the new
behaviour accessible via a config option ("-drive
file=nbd:127.0.0.1:5000:retry=forever,..." ?); and whether I'm going
about the changes in a sane way (I've attached the current version of
the patch).

Another thing I've noticed is that the nbd library ( /nbd.c ) is not
IPv6-compatible ( "-drive file=nbd:\:\:1:5000", for instance ) - I don't
have a patch for that yet, but I'm going to need to write one :) -
presumably you'd like that merging upstream too (and I should make the
library use the functions provided in qemu_socket.h) ?

Regards,
-- 
Nick Thomas
Bytemark Computing


Attachment: 01-make-nbd-retry.patch
Description: Text Data


reply via email to

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