ALWAYS_EXCEPT_SAVE=$ALWAYS_EXCEPT
test_0a() {
+ local obd_str="obdfilter.*-OST0000"
+ local osc_str="osc.*-OST0000-osc-[^M][^D][^t]*"
local types_save=($(do_facet ost1 \
- $LCTL get_param -n obdfilter.*.compress_types))
+ $LCTL get_param -n ${obd_str}.compress_types))
[[ -n "$types_save" ]] || skip "no OST support for compress_types"
stack_trap "do_facet ost1 \
- $LCTL set_param obdfilter.*.compress_types='$types_save'"
+ $LCTL set_param -n ${obd_str}.compress_types='$types_save' \
+ && umount_client $MOUNT && mount_client $MOUNT"
- echo " ** add lz4fast, delete lzo compression type on OST"
- do_facet ost1 $LCTL set_param obdfilter.*.compress_types=+lz4fast-lzo
+ echo " ** add lz4fast, delete lzo compression type on OST0000"
+ do_facet ost1 $LCTL set_param -n ${obd_str}.compress_types=+lz4fast-lzo
# remount client to get new compression types from OSS
umount_client $MOUNT
mount_client $MOUNT
- local types=$($LCTL get_param -n osc.*.import | grep compress_types)
- [[ -n "$types" ]] || {
- do_facet ost1 $LCTL get_param obdfilter.*.compress_types
- echo $types
+ local names=$($LCTL get_param -n $osc_str.import | grep name)
+ local types=$($LCTL get_param -n $osc_str.import | grep compress_types)
+ local obdtypes=$(do_facet ost1 $LCTL get_param $obd_str.compress_types)
+ echo " ** $obdtypes"
+ echo " ** $names"
+ echo " ** $types"
+ [[ -n "$types" ]] ||
error "cannot find any compress support on client"
- }
- [[ "$types" =~ "lz4fast" ]] || {
- do_facet ost1 $LCTL get_param obdfilter.*.compress_types
- echo $types
+ [[ "$types" =~ "lz4fast" ]] ||
error "cannot find lz4fast compress support on client"
- }
- [[ "$types" =~ "lzo" ]] && {
- do_facet ost1 $LCTL get_param obdfilter.*.compress_types
- echo $types
+ [[ ! "$types" =~ "lzo" ]] ||
error "should not have lzo compress support on client"
- }
-
- do_facet ost1 $LCTL set_param obdfilter.*.compress_types='$types_save'
- # need to remount to allow client to use all compression types
- umount_client $MOUNT
- mount_client $MOUNT
}
run_test 0a "compression types negotiation between client and OST"