+test_44d() {
+ local tf=$DIR/$tdir/$tfile
+ local size1
+ local size2
+ local size3
+ local size4
+
+ stack_trap "rm -f $tf"
+
+ mkdir -p $DIR/$tdir || error "create directroy failed"
+
+ dd if=/dev/zero of=$tf bs=1M count=10 || error "dd write $tfile failed"
+ sync
+ size1=$(stat -c "%s" $tf)
+ echo " ** before mirror ops, file size=$size1"
+
+ $LFS mirror extend -N2 -c1 $tf || error "mirror extend $tfile failed"
+ sync
+ size2=$(stat -c "%s" $tf)
+ echo " ** after mirror extend, file size=$size2"
+
+ (($size1 == $size2)) ||
+ error "mirror extend should not change size, before: $size1, after $size2"
+
+ $LFS mirror split -d --mirror-id=2 $tf ||
+ error "mirror split $tfile failed"
+
+ size2=$(stat -c "%s" $tf)
+ echo " ** after mirror split, file size=$size2"
+ (($size1 == $size2)) ||
+ error "mirror split should not change size, before: $size1, after $size2"
+
+ # Remount client to clear cached size information
+ remount_client $MOUNT
+ size2=$(stat -c "%s" $tf)
+ echo " ** after mirror split & remount, file size=$size2"
+ (($size1 == $size2)) ||
+ error "mirror extend should not change size, before: $size1, after $size2"
+
+}
+run_test 44d "lfs mirror split does not break size"
+