On Fri, Apr 22, 2011 at 04:35:11PM +1000, ronnie sahlberg wrote: > Ok, I am confused
And this time it's my fault, sorry. > 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) ? Sorry, I meant exactly the opposite. You do not have to set FUA if either of those two flags is present, so: if (flags & (BDRV_O_CACHE_WB|BDRV_O_NOCACHE)) caching is ok, write with FUA=0 else caching is NOT ok, write with FUA=1