Revision 93913dfd block/qcow2-cache.c
b/block/qcow2-cache.c | ||
---|---|---|
312 | 312 |
c->entries[i].dirty = true; |
313 | 313 |
} |
314 | 314 |
|
315 |
bool qcow2_cache_set_writethrough(BlockDriverState *bs, Qcow2Cache *c, |
|
316 |
bool enable) |
|
317 |
{ |
|
318 |
bool old = c->writethrough; |
|
319 |
|
|
320 |
if (!old && enable) { |
|
321 |
qcow2_cache_flush(bs, c); |
|
322 |
} |
|
323 |
|
|
324 |
c->writethrough = enable; |
|
325 |
return old; |
|
326 |
} |
Also available in: Unified diff