Revision 55b110f2
b/block.c | ||
---|---|---|
2168 | 2168 |
void bdrv_set_enable_write_cache(BlockDriverState *bs, bool wce) |
2169 | 2169 |
{ |
2170 | 2170 |
bs->enable_write_cache = wce; |
2171 |
|
|
2172 |
/* so a reopen() will preserve wce */ |
|
2173 |
if (wce) { |
|
2174 |
bs->open_flags |= BDRV_O_CACHE_WB; |
|
2175 |
} else { |
|
2176 |
bs->open_flags &= ~BDRV_O_CACHE_WB; |
|
2177 |
} |
|
2171 | 2178 |
} |
2172 | 2179 |
|
2173 | 2180 |
int bdrv_is_encrypted(BlockDriverState *bs) |
Also available in: Unified diff