+test_60() { # LU-471
+ if [ $(facet_fstype $SINGLEMDS) != ldiskfs ]; then
+ skip "Only applicable to ldiskfs-based MDTs"
+ return
+ fi
+
+ add mds1 $(mkfs_opts mds1) \
+ --mkfsoptions='\" -E stride=64 -O ^uninit_bg\"' --reformat \
+ $(mdsdevname 1) $(mdsvdevname 1) || exit 10
+
+ dump=$(do_facet $SINGLEMDS dumpe2fs $(mdsdevname 1))
+ rc=${PIPESTATUS[0]}
+ [ $rc -eq 0 ] || error "dumpe2fs $(mdsdevname 1) failed"
+
+ # MDT default has dirdata feature
+ echo $dump | grep dirdata > /dev/null || error "dirdata is not set"
+ # we disable uninit_bg feature
+ echo $dump | grep uninit_bg > /dev/null && error "uninit_bg is set"
+ # we set stride extended options
+ echo $dump | grep stride > /dev/null || error "stride is not set"
+ reformat
+}
+run_test 60 "check mkfs.lustre --mkfsoptions -E -O options setting"
+
+test_61() { # LU-80
+ local reformat=false
+
+ [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.1.53) ] ||
+ { skip "Need MDS version at least 2.1.53"; return 0; }
+
+ if [ $(facet_fstype $SINGLEMDS) == ldiskfs ] &&
+ ! large_xattr_enabled; then
+ reformat=true
+ local mds_dev=$(mdsdevname ${SINGLEMDS//mds/})
+ LDISKFS_MKFS_OPTS+=" -O large_xattr"
+ add $SINGLEMDS $(mkfs_opts $SINGLEMDS) --reformat $mds_dev ||
+ error "reformatting $mds_dev failed"
+ fi
+
+ setup_noconfig || error "setting up the filesystem failed"
+ client_up || error "starting client failed"
+
+ local file=$DIR/$tfile
+ touch $file
+
+ local large_value="$(generate_string $(max_xattr_size))"
+ local small_value="bar"
+
+ local name="trusted.big"
+ log "save large xattr $name on $file"
+ setfattr -n $name -v $large_value $file ||
+ error "saving $name on $file failed"
+
+ local new_value=$(get_xattr_value $name $file)
+ [[ "$new_value" != "$large_value" ]] &&
+ error "$name different after saving"
+
+ log "shrink value of $name on $file"
+ setfattr -n $name -v $small_value $file ||
+ error "shrinking value of $name on $file failed"
+
+ new_value=$(get_xattr_value $name $file)
+ [[ "$new_value" != "$small_value" ]] &&
+ error "$name different after shrinking"
+
+ log "grow value of $name on $file"
+ setfattr -n $name -v $large_value $file ||
+ error "growing value of $name on $file failed"
+
+ new_value=$(get_xattr_value $name $file)
+ [[ "$new_value" != "$large_value" ]] &&
+ error "$name different after growing"
+
+ log "check value of $name on $file after remounting MDS"
+ fail $SINGLEMDS
+ new_value=$(get_xattr_value $name $file)
+ [[ "$new_value" != "$large_value" ]] &&
+ error "$name different after remounting MDS"
+
+ log "remove large xattr $name from $file"
+ setfattr -x $name $file || error "removing $name from $file failed"
+
+ rm -f $file
+ stopall
+ if $reformat; then
+ LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS% -O large_xattr}
+ reformat
+ fi
+}
+run_test 61 "large xattr"
+
+test_62() {
+ if [ $(facet_fstype $SINGLEMDS) != ldiskfs ]; then
+ skip "Only applicable to ldiskfs-based MDTs"
+ return
+ fi
+
+ # MRP-118
+ local mdsdev=$(mdsdevname 1)
+ local ostdev=$(ostdevname 1)
+
+ [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.51) ]] ||
+ { skip "Need MDS version at least 2.2.51"; return 0; }
+
+ echo "disable journal for mds"
+ do_facet mds tune2fs -O ^has_journal $mdsdev || error "tune2fs failed"
+ start_mds && error "MDT start should fail"
+ echo "disable journal for ost"
+ do_facet ost1 tune2fs -O ^has_journal $ostdev || error "tune2fs failed"
+ start_ost && error "OST start should fail"
+ cleanup || return $?
+ reformat_and_config
+}
+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
+