*/
result = mdt_refetch_lovea(info, child, ma, ibits);
- mdt_counter_incr(req, LPROC_MDT_OPEN,
- ktime_us_delta(ktime_get(), kstart));
-
GOTO(out_child_unlock, result);
out_child_unlock:
out:
if (result)
lustre_msg_set_transno(req->rq_repmsg, 0);
+ else
+ mdt_counter_incr(req, LPROC_MDT_OPEN,
+ ktime_us_delta(ktime_get(), kstart));
+
return result;
}
local testdir=$DIR/${tdir}/stats_testdir
- mkdir -p $DIR/${tdir}
+ mkdir_on_mdt0 $DIR/${tdir}
# clear stats.
do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear
touch ${testdir}/${tfile} || error "touch failed"
check_stats $SINGLEMDS "open" 1
check_stats $SINGLEMDS "close" 1
+ # open should match close
+ ls -lR ${testdir}
+ check_stats $SINGLEMDS "open" 2
+ check_stats $SINGLEMDS "close" 2
[ $MDS1_VERSION -ge $(version_code 2.8.54) ] && {
mknod ${testdir}/${tfile}-pipe p || error "mknod failed"
check_stats $SINGLEMDS "mknod" 2
check_stats $SINGLEMDS "rmdir" 1
local testdir1=$DIR/${tdir}/stats_testdir1
- mkdir_on_mdt0 -p ${testdir}
- mkdir_on_mdt0 -p ${testdir1}
+ mkdir_on_mdt0 ${testdir}
+ mkdir_on_mdt0 ${testdir1}
touch ${testdir1}/test1
mv ${testdir1}/test1 ${testdir} || error "file crossdir rename"
check_stats $SINGLEMDS "crossdir_rename" 1