qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] migration: adding migration to/from a file (v2)


From: Jamie Lokier
Subject: Re: [Qemu-devel] migration: adding migration to/from a file (v2)
Date: Thu, 19 Feb 2009 20:28:49 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> >Sure looks like a bug.
> I wish!  It's Unix suckiness.

Windows is the same.
It's a more of a conceptual problem than it looks, not merely an API bug.

It comes down to "what would 'readable' and 'writable' mean on a file?".

For a pipe or socket, readability depends on whether it's connected
and some data has been received from another process.  That's
well-defined.

For a file, readability depends on the OS knowing in advance that you
_want_ to read the file so it can issue a request to the underlying
device - but it doesn't know you want to read the file until you call
read() at a specific offset and length, so readability is not
well-defined.  Writability is similar but also depends on dynamic
memory availability.

That's why AIO is more fundemantally required for files than streams.

AIO is how you tell the OS "I'm going to want to read or write this bit".

-- Jamie




reply via email to

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