if a file has no stripes, but the size isn't zero,
then do not try to propagate this size to stripes.
Change-Id: I25401bcc41e3ea84a2b9158120f1e907af47fafa
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/16743
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LASSERT(lo->ldo_stripe || lo->ldo_stripenr == 0);
LASSERT(lo->ldo_stripe_size > 0);
+ if (lo->ldo_stripenr == 0)
+ RETURN(0);
+
rc = dt_attr_get(env, next, attr);
LASSERT(attr->la_valid & LA_SIZE);
if (rc)
}
run_test 58 "Truncate a released file will trigger restore"
+test_59() {
+ local fid
+ copytool_setup
+ $MCREATE $DIR/$tfile || error "mcreate failed"
+ $TRUNCATE $DIR/$tfile 42 || error "truncate failed"
+ $LFS hsm_archive $DIR/$tfile || error "archive request failed"
+ fid=$(path2fid $DIR/$tfile)
+ wait_request_state $fid ARCHIVE SUCCEED
+ $LFS hsm_release $DIR/$tfile || error "release failed"
+ copytool_cleanup
+}
+run_test 59 "Release stripeless file with non-zero size"
+
test_60() {
# This test validates the fix for LU-4512. Ensure that the -u
# option changes the progress reporting interval from the