On Tue, May 18, 2010 at 07:30:00PM -0400, Kevin O'Connor wrote:
On Tue, May 18, 2010 at 08:19:03AM +0300, Gleb Natapov wrote:
On Mon, May 17, 2010 at 07:27:30PM -0400, Kevin O'Connor wrote:
On Mon, May 17, 2010 at 04:27:27PM +0300, Gleb Natapov wrote:
- Check if blk_size is valid in virtio_blk config.
- Disable interrupt otherwise interrupt may stuck with some guests.
Signed-off-by: Gleb Natapov gleb@redhat.com
Thanks. I committed your change to my local repo. I don't much like that goto though - is it okay if we break up virtio_blk_setup with the patch below (on top of your patch)?
Yes, but the previous code bailed out from virtio_blk_setup() completely if allocation failed. What is the point to continue trying to allocate same amount of memory again and again. You patch changes this.
I think I'd prefer to have the debug report for every discovered device. (So that I knew all the devices my memory problem was preventing me from using.)
What about making init_virtio_blk() return -1 on failure and check return value in virtio_blk_setup()?
I don't think a sane setup would lead to a malloc call failing, but if you would like to see this another way, that's fine - just send a patch.
Nah, if you like it that way, let it be.
-- Gleb.