From: Matt Ezell Date: Wed, 15 Jun 2016 00:51:07 +0000 (-0400) Subject: LU-8150 mdt: Track open+create as mknod X-Git-Tag: 2.8.56~122 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6c2bbc022832087f2ff0f65d83e3b0a460e45911;hp=941bd1f21405fe3d934bbab2f6907f69f5dee372 LU-8150 mdt: Track open+create as mknod Regular files created with mknod are tracked, but most files are created as an open with create intent. Track this as a mknod also. Signed-off-by: Matt Ezell Change-Id: I8f6ab9d91d0b31062c7f73f8394a1b12f7963f1c Reviewed-on: http://review.whamcloud.com/20246 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 25938df..b305b57 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -1416,7 +1416,8 @@ again: if (result != 0) GOTO(out_child, result); } - created = 1; + created = 1; + mdt_counter_incr(req, LPROC_MDT_MKNOD); } else { /* * The object is on remote node, return its FID for remote open. diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 0ada97c..87d9bad 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9284,8 +9284,10 @@ test_133a() { touch ${testdir}/${tfile} || "touch failed" check_stats $SINGLEMDS "open" 1 check_stats $SINGLEMDS "close" 1 - mknod ${testdir}/${tfile}-pipe p || "mknod failed" - check_stats $SINGLEMDS "mknod" 1 + [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ] && { + mknod ${testdir}/${tfile}-pipe p || "mknod failed" + check_stats $SINGLEMDS "mknod" 2 + } rm -f ${testdir}/${tfile}-pipe || "pipe remove failed" check_stats $SINGLEMDS "unlink" 1 rm -f ${testdir}/${tfile} || error "file remove failed"