summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-08-10 16:47:32 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-08-12 14:26:17 -0400
commitd099d7b8316f3ebd63472d207c4801a464330016 (patch)
tree5fdce55ec1b33c20c4b61eedaaf378e89b00f782
parent86d80f973434de24d8a807a92cd59d5ced7bd519 (diff)
downloadlinux-d099d7b8316f3ebd63472d207c4801a464330016.tar.gz
linux-d099d7b8316f3ebd63472d207c4801a464330016.tar.bz2
linux-d099d7b8316f3ebd63472d207c4801a464330016.zip
pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes
Turned out I misinterpreted the spec... Cc: Tom Haynes <thomas.haynes@primarydata.com> Reported-by: Jean Spector <jean@primarydata.com> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index b3289d701eea..ba74b15bf0ba 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;