[Top][All Lists]

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

Re: [Qemu-devel] iSCSI support for QEMU, update

From: ronnie sahlberg
Subject: Re: [Qemu-devel] iSCSI support for QEMU, update
Date: Fri, 22 Apr 2011 16:35:11 +1000

Ok, I am confused

On Fri, Apr 22, 2011 at 4:13 PM, Christoph Hellwig <address@hidden> wrote:
> On Fri, Apr 22, 2011 at 04:08:57PM +1000, ronnie sahlberg wrote:
>> So I should set FUA when
>> 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;

I have to set FUA if the WB(I guessed this meant write-back) flag is set?
Not the opposite (I assume opposite of write-back is write-through) ?

So that would mean
   if (flags & (BDRV_O_CACHE_WB|BDRV_O_NOCACHE))
          caching is NOT ok, write with FUA=1
          caching is ok, write with FUA=0
right ?

ronnie sahlberg

reply via email to

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