mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
xen/blkback: Report VBD_WSECT (wr_sect) properly.
commit 5c62cb4860 upstream.
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.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f53881e646
commit
9ad93ba528
|
|
@ -667,7 +667,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user