Revision 6af4e9ea block/qcow2.c

b/block/qcow2.c
220 220
    int len, i, ret = 0;
221 221
    QCowHeader header;
222 222
    uint64_t ext_end;
223
    bool writethrough;
224 223

  
225 224
    ret = bdrv_pread(bs->file, 0, &header, sizeof(header));
226 225
    if (ret < 0) {
......
367 366
    }
368 367

  
369 368
    /* alloc L2 table/refcount block cache */
370
    writethrough = ((flags & BDRV_O_CACHE_WB) == 0);
371
    s->l2_table_cache = qcow2_cache_create(bs, L2_CACHE_SIZE, writethrough);
372
    s->refcount_block_cache = qcow2_cache_create(bs, REFCOUNT_CACHE_SIZE,
373
        writethrough);
369
    s->l2_table_cache = qcow2_cache_create(bs, L2_CACHE_SIZE);
370
    s->refcount_block_cache = qcow2_cache_create(bs, REFCOUNT_CACHE_SIZE);
374 371

  
375 372
    s->cluster_cache = g_malloc(s->cluster_size);
376 373
    /* one more sector for decompressed data alignment */

Also available in: Unified diff