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.

Paolo

Reply via email to