From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Fwd: xentop reporting zero written sectors Date: Mon, 10 Oct 2011 12:31:29 -0400 Message-ID: <20111010163129.GF28646@phenom.oracle.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andy Burns Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, Oct 10, 2011 at 04:16:04PM +0100, Andy Burns wrote: > No response in xen-users, asking developers .... >=20 > ---------- Forwarded message ---------- >=20 > 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. >=20 > The VBD_RD =A0and 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! >=20 > 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-blkb= ack/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 *blk= if, =20 if (operation =3D=3D READ) blkif->st_rd_sect +=3D preq.nr_sects; - else if (operation =3D=3D WRITE || operation =3D=3D WRITE_FLUSH) + else if (operation =3D=3D WRITE_ODIRECT || operation =3D=3D WRITE_FLUSH= ) blkif->st_wr_sect +=3D preq.nr_sects; =20 return 0; Thanks for reporting it!