lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[226/264] xen/blkback: Report VBD_WSECT (wr_sect) properly.
    3.1-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

    commit 5c62cb48602dba95159c81ffeca179d3852e25be 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>

    ---
    drivers/block/xen-blkback/blkback.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/block/xen-blkback/blkback.c
    +++ b/drivers/block/xen-blkback/blkback.c
    @@ -685,7 +685,7 @@ static int dispatch_rw_block_io(struct x

    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;



    \
     
     \ /
      Last update: 2011-11-10 05:03    [W:2.095 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site