[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] iSCSI support for QEMU, update
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] iSCSI support for QEMU, update |
Date: |
Fri, 22 Apr 2011 08:13:47 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Fri, Apr 22, 2011 at 04:08:57PM +1000, ronnie sahlberg wrote:
> So I should set FUA when
> BDRV_O_CACHE_WB==0 or BDRV_O_NOCACHE==1
> right?
At this point you need to set it if either the BDRV_O_CACHE_WB and
BDRV_O_NOCACHE flags are set. And yes, the naming of the nocache
flag is rather confusing.
Take a look at block.c:bdrv_open_common():
/*
* Yes, BDRV_O_NOCACHE aka O_DIRECT means we have to present a
* write cache to the guest. We do need the fdatasync to flush
* out transactions for block allocations, and we maybe have a
* volatile write cache in our backing device to deal with.
*/
if (flags & (BDRV_O_CACHE_WB|BDRV_O_NOCACHE))
bs->enable_write_cache = 1;