qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC][PATCH v2 00/11] QEMU Guest Agent: QMP-based host/


From: Jes Sorensen
Subject: Re: [Qemu-devel] [RFC][PATCH v2 00/11] QEMU Guest Agent: QMP-based host/guest communication (virtagent)
Date: Tue, 03 May 2011 16:12:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 05/03/11 15:53, Michael Roth wrote:
>>
>> IMHO it is better to disable the commands rather than just logging, but
>> either way should allow it to drop in.
> 
> Kinda agree, but logging seems to be the real dependency. With the
> server-side timeouts now in place even doing stuff like fopen/fwrite is
> permitted (it would just timeout if it blocked too long). It's the
> logging stuff that we don't really have a way to recover from, because
> it's not run in a thread we can just nuke after a certain amount of time.
> 
> Even when we're not frozen, we can't guarantee an fopen/fwrite/fread
> will succeed, so failures shouldn't be too much of a surprise since they
> need to be handled anyway. And determining whether or not a command
> should be marked as executable during a freeze is somewhat nebulous
> (fopen might work for read-only access, but hang for write access when
> O_CREATE is set, fwrite might succeed if it doesn't require a flush,
> etc), plus internal things like logging need to be taken into account.
> 
> So, for now at least I think it's a reasonable way to do it.

Please be very careful with any fwrite() calls - it's not just logging.
Any writes to the frozen file systems will result in the caller being
put to sleep until the file system is unfrozen. It won't timeout, and
the agent will be stuck hanging in that call.

It's fun playing with the fsfreeze stuff on your desktop system - doing
it in an xterm has 'interesting' effects..... :)

This is why I prefer the 'disable function' rather 'disable logging'
approach.

>> Sorry for the late reply, been a bit swamped here.
> 
> No problem I have your patches in my tree now. They still need a little
> bit of love and testing but I should be able to get them out on the list
> shortly.

Sounds great!

Cheers,
Jes



reply via email to

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