From: Peng Tao Date: Mon, 10 Aug 2015 08:47:32 +0000 (+0800) Subject: pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes X-Git-Tag: v4.9.8~3612^2~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d099d7b8316f3ebd63472d207c4801a464330016;p=platform%2Fkernel%2Flinux-rpi3.git pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes Turned out I misinterpreted the spec... Cc: Tom Haynes Reported-by: Jean Spector Signed-off-by: Peng Tao Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index b3289d7..ba74b15 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1863,10 +1863,9 @@ ff_layout_mirror_prepare_stats(struct nfs42_layoutstat_args *args, memcpy(&devinfo->dev_id, &dev->deviceid, NFS4_DEVICEID4_SIZE); devinfo->offset = pls->pls_range.offset; devinfo->length = pls->pls_range.length; - /* well, we don't really know if IO is continuous or not! */ - devinfo->read_count = mirror->read_stat.io_stat.bytes_completed; + devinfo->read_count = mirror->read_stat.io_stat.ops_completed; devinfo->read_bytes = mirror->read_stat.io_stat.bytes_completed; - devinfo->write_count = mirror->write_stat.io_stat.bytes_completed; + devinfo->write_count = mirror->write_stat.io_stat.ops_completed; devinfo->write_bytes = mirror->write_stat.io_stat.bytes_completed; devinfo->layout_type = LAYOUT_FLEX_FILES; devinfo->layoutstats_encode = ff_layout_encode_layoutstats;