Skip to contentSkip to conversation

pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes

PATCH New Peng Tao 1 participant 1 message Aug 10, 2015

Subsystems (2)
lore
Share & tools
lore

Peng Tao

author
#0 lore raw

PATCH 1/1 pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytes

Turned out I misinterpreted the spec...

---
 fs/nfs/flexfilelayout/flexfilelayout.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/nfs/flexfilelayout/flexfilelayout.c +2 -3
index e69860c..ba388e9 100644
@@ -1866,10 +1866,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;
Signature · 1 line
1.8.3.1