diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-11-22 13:39:47 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-03 15:26:49 +0100 |
commit | 7ce21016b69b512bf4777965a4292318f2bc7544 (patch) | |
tree | 5f79714c6bdb5996906ab6e8ebdbf262621e8d92 /block.c | |
parent | d5ef94d43da8c57a2d597efbdec3d9a54d97fdf7 (diff) | |
download | hqemu-7ce21016b69b512bf4777965a4292318f2bc7544.zip hqemu-7ce21016b69b512bf4777965a4292318f2bc7544.tar.gz |
block: handle ENOTSUP from discard in generic code
Similar to write_zeroes, let the generic code receive a ENOTSUP for
discard operations. Since bdrv_discard has advisory semantics,
we can just swallow the error.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4376,7 +4376,7 @@ int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, ret = co.ret; } } - if (ret) { + if (ret && ret != -ENOTSUP) { return ret; } |