qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers
Date: Fri, 14 Sep 2012 09:55:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 14.09.2012 09:50, schrieb Paolo Bonzini:
> Il 14/09/2012 09:27, Kevin Wolf ha scritto:
>> I can't see how bs->file is needed here for writethrough semantics.
>> bdrv_open_common() sets bs->enable_write_cache to false and
>> bdrv_co_do_writev() checks it and flushes if necessary. Looks fine to me.
> 
> You're right.
> 
>> In fact, bdrv_open_common() even removes BDRV_O_CACHE_WB, so what Jeff
>> removes here is really dead code (checked with strace: The file isn't
>> opened with O_SYNC even when using -drive format=file).
> 
> Yes, it's dead, on the other hand we still honor BDRV_O_CACHE_WB in all
> the other protocols.  Either we go and touch all the protocols
> (effectively removing BDRV_O_CACHE_WB from the BlockDriver
> specification), or treating raw-{posix,win32} specially means we leave
> bugs everywhere else.

Yes, touch all protocols and fix them. BDRV_O_CACHE_WB should be for
block.c only.

Kevin



reply via email to

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