Commit cd8fb tries to account sumsq for every client operation, but
lprocfs_counter_init() did not init them properly, also add a test
case to verify new format of client stats.
Fixes:
cd8fb1e8d300 ("LU-13597 ofd: add more information to job_stats")
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I4c7fc4c3958fdab757a9755cc851836971a4b700
Reviewed-on: https://review.whamcloud.com/39223
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
/* do counter init */
for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) {
u32 type = llite_opcode_table[id].type;
/* do counter init */
for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) {
u32 type = llite_opcode_table[id].type;
if (type & LPROCFS_TYPE_REQS)
ptr = "reqs";
else if (type & LPROCFS_TYPE_BYTES)
ptr = "bytes";
if (type & LPROCFS_TYPE_REQS)
ptr = "reqs";
else if (type & LPROCFS_TYPE_BYTES)
ptr = "bytes";
- else if (type & LPROCFS_TYPE_PAGES)
- ptr = "pages";
else if (type & LPROCFS_TYPE_USEC)
ptr = "usec";
lprocfs_counter_init(sbi->ll_stats,
else if (type & LPROCFS_TYPE_USEC)
ptr = "usec";
lprocfs_counter_init(sbi->ll_stats,
- llite_opcode_table[id].opcode,
- (type & LPROCFS_CNTR_AVGMINMAX),
+ llite_opcode_table[id].opcode, type,
llite_opcode_table[id].opname, ptr);
}
llite_opcode_table[id].opname, ptr);
}
}
run_test 205b "Verify job stats jobid and output format"
}
run_test 205b "Verify job stats jobid and output format"
+# LU-13733
+test_205c() {
+ $LCTL set_param llite.*.stats=0
+ dd if=/dev/zero of=$DIR/$tfile.1 bs=4k count=1
+ $LCTL get_param llite.*.stats
+ $LCTL get_param llite.*.stats | grep \
+ "write_bytes *1 samples \[bytes\] 4096 4096 4096 16777216" ||
+ error "wrong client stats format found"
+}
+run_test 205c "Verify client stats format"
+
# LU-1480, LU-1773 and LU-1657
test_206() {
mkdir -p $DIR/$tdir
# LU-1480, LU-1773 and LU-1657
test_206() {
mkdir -p $DIR/$tdir