qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 01/15] block: Add "file" output parameter to


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 01/15] block: Add "file" output parameter to block status query functions
Date: Tue, 1 Dec 2015 17:25:33 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Nov 30, 2015 at 05:09:49PM +0800, Fam Zheng wrote:
> On Mon, 11/30 16:38, Stefan Hajnoczi wrote:
> > On Thu, Nov 26, 2015 at 01:05:21PM +0800, Fam Zheng wrote:
> > > @@ -1535,13 +1541,14 @@ static int64_t coroutine_fn 
> > > bdrv_co_get_block_status(BlockDriverState *bs,
> > >          }
> > >      }
> > >  
> > > -    if (bs->file &&
> > > +    if (*file && *file != bs &&
> > >          (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
> > >          (ret & BDRV_BLOCK_OFFSET_VALID)) {
> > 
> > What is the purpose of this change?
> 
> The code here is to sensibly detect "zero" by going into the "file" which the
> offset is valid for. Now the "file" is no longer always "bs->file", so we use
> the returned "file" pointer instead.

Thanks for explaining!

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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