summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-10-10 18:33:21 +0200
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-10-13 15:48:37 +0200
commit5c62cb48602dba95159c81ffeca179d3852e25be (patch)
treeebd8920d2681fdf485eaaaa625310c29f5e239db /drivers/block/xen-blkback
parentxen/blkback: Support 'feature-barrier' aka old-style BARRIER requests. (diff)
downloadlinux-5c62cb48602dba95159c81ffeca179d3852e25be.tar.xz
linux-5c62cb48602dba95159c81ffeca179d3852e25be.zip
xen/blkback: Report VBD_WSECT (wr_sect) properly.
We did not increment the amount of sectors written to disk b/c we tested for the == WRITE which is incorrect - as the operations are more of WRITE_FLUSH, WRITE_ODIRECT. This patch fixes it by doing a & WRITE check. CC: stable@kernel.org Reported-by: Andy Burns <xen.lists@burns.me.uk> Suggested-by: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkback')
-rw-r--r--drivers/block/xen-blkback/blkback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 184b1335c8e9..c15c559e8662 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -776,7 +776,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)
blkif->st_wr_sect += preq.nr_sects;
return 0;