Whamcloud - gitweb
LU-8150 mdt: Track open+create as mknod 46/20246/6
authorMatt Ezell <ezellma@ornl.gov>
Wed, 15 Jun 2016 00:51:07 +0000 (20:51 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Jun 2016 02:55:25 +0000 (02:55 +0000)
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 <ezellma@ornl.gov>
Change-Id: I8f6ab9d91d0b31062c7f73f8394a1b12f7963f1c
Reviewed-on: http://review.whamcloud.com/20246
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_open.c
lustre/tests/sanity.sh

index 25938df..b305b57 100644 (file)
@@ -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.
index 0ada97c..87d9bad 100644 (file)
@@ -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"