}
run_test 1021 "change file compressibiblity"
+test_1030() {
+ (( MDS1_VERSION >= $(version_code 2.14.0-ddn153) )) ||
+ skip "Need MDS version at least 2.14.0-ddn153"
+
+ test_mkdir -p $DIR/$tdir
+ local tf=$DIR/$tdir/$tfile
+ local hdf=$LUSTRE/tests/AMSR_E_L3_DailyOcean_V05_20111003.hdf
+ local tmp_hdf=$TMP/$tfile.hdf
+ local size1
+ local size2
+
+ if [[ ! -f $tmp_hdf ]]; then
+ if [[ -f $hdf.bz2 ]] && type -p bzcat >/dev/null; then
+ bzcat $hdf.bz2 > $tmp_hdf
+ elif [[ -f $hdf.bz2 ]] && type -p bunzip2 >/dev/null; then
+ cp $hdf.bz2 $tmp_hdf.bz2 || error "cp $tmp_hdf.bz2"
+ bunzip2 $tmp_hdf.bz2 || error "bunzip2 $tmp_hdf.bz2"
+ else
+ skip_env "bunzip2 is not installed"
+ fi
+ fi
+
+ stack_trap "rm -f $tf"
+ compression_enabled || skip "compression is disabled ($(uname -a))"
+
+ $LFS setstripe -E-1 -c1 -Z lz4fast:3 --compress-chunk=64 $tf ||
+ error "set a compress component in $tf failed"
+
+ cp $tmp_hdf $tf
+ sync ; sync
+ size1=$(du -sk $tf | awk '{print $1}')
+ echo "compressed size with lz4fast:3: $size1"
+
+ $LFS migrate -E eof -Z lz4:6 $tf || error "migrate failed"
+ sync ; sync
+ size2=$(du -sk $tf | awk '{print $1}')
+ echo "compressed size with lz4:6: $size2"
+
+ (( $size2 < $size1 )) ||
+ error "lz4:6 ($size2) should be less than lz4:3 ($size1)"
+}
+run_test 1030 "Migrate to another compression level"
+
test_1080() {
(( MDS1_VERSION >= $(version_code 2.14.0-ddn128) )) ||
skip "Need MDS version at least 2.14.0-ddn128"