qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: complete all IOs before .bdrv_truncate


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] block: complete all IOs before .bdrv_truncate
Date: Mon, 18 Feb 2013 10:41:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/18/2013 05:48 AM, Peter Lieven wrote:
> bdrv_truncate() invalidates the bdrv_check_request() result for
> in-flight requests, so there should better be none.
> 
> Signed-off-by: Peter Lieven <address@hidden>
> Reported-by: Kevin Wolf <address@hidden>
> ---
>  block.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/block.c b/block.c
> index 50dab8e..d8880e3 100644
> --- a/block.c
> +++ b/block.c
> @@ -2427,6 +2427,10 @@ int bdrv_truncate(BlockDriverState *bs, int64_t
> offset)
>          return -EACCES;
>      if (bdrv_in_use(bs))
>          return -EBUSY;
> +
> +    /* there should be better no IOs in flight when we truncate the
> device */

Grammar.  Not sure what you were trying to say, but this might be better:

/* There should not be any in-flight IOs when we truncate the device. */

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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