WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Fwd: xentop reporting zero written sectors

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Fwd: xentop reporting zero written sectors
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 11 Oct 2011 08:49:44 +0100
Cc: Andy Burns <xen.lists@xxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 11 Oct 2011 00:50:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111010163129.GF28646@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <CAE1-PRdq9BWjTTHPPBPvESr-ULcdjHgPMTABcCO6+wCLJ1UYog@xxxxxxxxxxxxxx> <CAE1-PReA8E-kSif=BU=s-vzOqi-4F4LotxqofH7EEw+dYLtpUA@xxxxxxxxxxxxxx> <20111010163129.GF28646@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-10-10 at 17:31 +0100, Konrad Rzeszutek Wilk wrote:
> On Mon, Oct 10, 2011 at 04:16:04PM +0100, Andy Burns wrote:
> > No response in xen-users, asking developers ....
> > 
> > ---------- Forwarded message ----------
> > 
> > Just moving a chunk of files from one filesysstem on xvba to another
> > on xvdb, and was monitoring with xentop as it was taking longer than
> > expected.
> > 
> > The VBD_RD  and VBD_WR counters were both clocking-up as expected, as
> > was the VBD_RSECT counter, but the VBD_WSECT counter was stuck on
> > zero, I toggled on the individual VBD device counters and these showed
> > the same (with the RD and WR counters correctly split between my
> > source and destination disks)
> 
> Huh. Imagine that!
> > 
> > Is this a long standing "feature" that I've never noticed before or a
> > problem that should be reported?
> 
> Must be a feature. We would never write code with bugs. Never :-)
> 
> I think this new "feature" below will fix it for you:
> 
> 
> diff --git a/drivers/block/xen-blkback/blkback.c 
> b/drivers/block/xen-blkback/blkback.c
> index 0bd7143..3e2ca68 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -778,7 +778,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
>  
>       if (operation == READ)
>               blkif->st_rd_sect += preq.nr_sects;
> -     else if (operation == WRITE || operation == WRITE_FLUSH)
> +     else if (operation == WRITE_ODIRECT || operation == WRITE_FLUSH)

Would it be sane to key this off req->operation and BLKIF_OP_* instead
of first encoding them as block layer operations and then decoding back
again? The use of operation here just seems to be adding a layer of
indirection which we don't want or need.

Or maybe (operation & WRITE) instead of == ?

Ian.

>               blkif->st_wr_sect += preq.nr_sects;
>  
>       return 0;
> 
> 
> Thanks for reporting it!
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel