diff options
-rw-r--r-- | block/qcow2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 7cfcd84..ed9e0f3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -668,6 +668,14 @@ static int qcow2_update_options_prepare(BlockDriverState *bs, r->cache_clean_interval = qemu_opt_get_number(opts, QCOW2_OPT_CACHE_CLEAN_INTERVAL, s->cache_clean_interval); +#ifndef CONFIG_LINUX + if (r->cache_clean_interval != 0) { + error_setg(errp, QCOW2_OPT_CACHE_CLEAN_INTERVAL + " not supported on this host"); + ret = -EINVAL; + goto fail; + } +#endif if (r->cache_clean_interval > UINT_MAX) { error_setg(errp, "Cache clean interval too big"); ret = -EINVAL; |