qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] block: Add blk_make_empty()


From: Eric Blake
Subject: Re: [PATCH 3/4] block: Add blk_make_empty()
Date: Tue, 28 Apr 2020 09:28:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/28/20 8:55 AM, Eric Blake wrote:

+++ b/include/sysemu/block-backend.h
@@ -266,4 +266,6 @@ int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
  const BdrvChild *blk_root(BlockBackend *blk);
+int blk_make_empty(BlockBackend *blk, Error **errp);
+

Again, a flag parameter to allow use of BDRV_REQ_NO_FALLBACK would be nice.

Or maybe not, after reading Kevin's responses. Making an image empty is not the same as making it read as zero. If we can't come up with a use for a flag, then deferring the addition of a flag until later is a perfectly reasonable approach (rather than adding a flag now that will never get set to anything other than 0). This isn't quite the same as a public API where we would regret being locked out of a flag down the road.


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]