qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 21/23] migration: Don't use callback on file def


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 21/23] migration: Don't use callback on file defining it
Date: Wed, 05 Oct 2011 01:50:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Anthony Liguori <address@hidden> wrote:
> On 09/23/2011 07:57 AM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela<address@hidden>
>
> I don't think this is better.  It just eliminates the possibility of
> having useful trace points in get_error.

It's use is not consistent at all (same places use get_error() and the
others the native ones).

And after this change, it gets clear what get_error() does, just four
uses:

migration.c:266:    } while (ret == -1 && ((s->get_error(s)) == EINTR));
migration.c:269:        ret = -(s->get_error(s));
migration.c:341:    } while (ret == -1 && (s->get_error(s)) == EINTR);
migration.c:344:        qemu_file_set_error(s->file, s->get_error(s));

The first two are the same one (just that we don't store the value in a
variable), same for the other two.

And everything uses errno for it, except migration-tcp on windows, that
is the only valid case for windows.

So, what we really need here is a way to get error of last system call,
abstracted by OS, not by migration method, and another call that we can
remove.

After the patch, this is easy to find (before it is more complicated).

So, patch stand and will search for a way to abstract for errno on
migration code. (just using socket_error() will work.

What do you think?

Later, Juan.



reply via email to

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