Whamcloud - gitweb
LU-1548 tests: add test 63 in conf-sanity
authorwangdi <di.wang@whamcloud.com>
Fri, 10 Aug 2012 17:05:25 +0000 (10:05 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Aug 2012 14:45:42 +0000 (10:45 -0400)
Add test_63 in conf-sanity to verify each page can
at least hold 3 ldiskfs inode.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I281df5945a1e26736bb2b27c211a8239d25e0c7e
Reviewed-on: http://review.whamcloud.com/3605
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/tests/conf-sanity.sh

index 7397bc5..89e9568 100644 (file)
@@ -2909,6 +2909,26 @@ test_62() {
 }
 run_test 62 "start with disabled journal"
 
+test_63() {
+       if [ $(facet_fstype $SINGLEMDS) != ldiskfs ]; then
+               skip "Only applicable to ldiskfs-based MDTs"
+               return
+       fi
+
+       local inode_slab=$(do_facet $SINGLEMDS \
+               "awk '/ldiskfs_inode_cache/ { print \\\$5 }' /proc/slabinfo")
+       if [ -z "$inode_slab" ]; then
+               skip "ldiskfs module has not been loaded"
+               return
+       fi
+
+       echo "$inode_slab ldisk inodes per page"
+       [ "$inode_slab" -ge "3" ] ||
+               error "ldisk inode size is too big, $inode_slab objs per page"
+       return
+}
+run_test 63 "Verify each page can at least hold 3 ldisk inodes"
+
 if ! combined_mgs_mds ; then
        stop mgs
 fi