[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 2/2] vmdk: Optimize cluster allocation
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v5 2/2] vmdk: Optimize cluster allocation |
Date: |
Tue, 29 Jul 2014 21:32:42 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, 07/29 13:51, Stefan Hajnoczi wrote:
> On Tue, Jul 29, 2014 at 09:00:43AM +0800, Fam Zheng wrote:
> > On Mon, 07/28 16:11, Stefan Hajnoczi wrote:
> > > On Tue, May 27, 2014 at 04:49:22PM +0800, Fam Zheng wrote:
> > > > + if (!bs->backing_hd) {
> > > > + memset(whole_grain, 0, skip_start_sector << BDRV_SECTOR_BITS);
> > > > + memset(whole_grain + (skip_end_sector << BDRV_SECTOR_BITS), 0,
> > > > + cluster_bytes - (skip_end_sector << BDRV_SECTOR_BITS));
> > > > + }
> > > > +
> > > > + assert(skip_end_sector <= sector_num + extent->cluster_sectors);
> > >
> > > Does this assertion make sense? skip_end_sector is a small number of
> > > sectors (relative to start of cluster), while sector_num +
> > > extent->cluster_sectors is a large absolute sector offset.
> >
> > skip_end_sector is absolute sector number too. The caller hunk in this patch
> > is:
>
> I disagree.
You are right, I totally misread when replying. Will respin to fix the
assertion and also the spellings.
Thanks for reviewing and explaining my mistake :)
Fam