BSWAP_64(drrs->drr_compressed_size);
drrs->drr_type = BSWAP_32(drrs->drr_type);
}
+
+ payload_size = DRR_SPILL_PAYLOAD_SIZE(drrs);
+
if (verbose) {
sprintf_bytes(salt, drrs->drr_salt,
ZIO_DATA_SALT_LEN);
"length = %llu flags = %u "
"compression type = %u "
"compressed_size = %llu "
+ "payload_size = %llu "
"salt = %s iv = %s mac = %s\n",
(u_longlong_t)drrs->drr_object,
(u_longlong_t)drrs->drr_length,
drrs->drr_flags,
drrs->drr_compressiontype,
(u_longlong_t)drrs->drr_compressed_size,
+ (u_longlong_t)payload_size,
salt,
iv,
mac);
}
- (void) ssread(buf, drrs->drr_length, &zc);
+ (void) ssread(buf, payload_size, &zc);
if (dump) {
- print_block(buf, drrs->drr_length);
+ print_block(buf, payload_size);
}
break;
case DRR_WRITE_EMBEDDED:
{
struct drr_spill *drrs = &(dsp->dsa_drr->drr_u.drr_spill);
uint64_t blksz = BP_GET_LSIZE(bp);
+ uint64_t payload_size = blksz;
if (dsp->dsa_pending_op != PENDING_NONE) {
if (dump_record(dsp, NULL, 0) != 0)
drrs->drr_compressed_size = BP_GET_PSIZE(bp);
zio_crypt_decode_params_bp(bp, drrs->drr_salt, drrs->drr_iv);
zio_crypt_decode_mac_bp(bp, drrs->drr_mac);
+ payload_size = drrs->drr_compressed_size;
}
- if (dump_record(dsp, data, blksz) != 0)
+ if (dump_record(dsp, data, payload_size) != 0)
return (SET_ERROR(EINTR));
return (0);
}
ra->byteswap;
abuf = arc_loan_raw_buf(dmu_objset_spa(ra->os),
- drrs->drr_object, byteorder, drrs->drr_salt,
+ dmu_objset_id(ra->os), byteorder, drrs->drr_salt,
drrs->drr_iv, drrs->drr_mac, drrs->drr_type,
drrs->drr_compressed_size, drrs->drr_length,
drrs->drr_compressiontype);
#
#
-# Copyright (c) 2017 by Datto Inc. All rights reserved.
+# Copyright (c) 2018 by Datto Inc. All rights reserved.
#
. $STF_SUITE/tests/functional/rsend/rsend.kshlib
# 6. Add a file truncated to 4M to the filesystem
# 7. Add a sparse file with metadata compression disabled to the filesystem
# 8. Add and remove 1000 empty files to the filesystem
-# 9. Snapshot the filesystem
-# 10. Send and receive the filesystem, ensuring that it can be mounted
+# 9. Add a file with a large xattr value
+# 10. Snapshot the filesystem
+# 11. Send and receive the filesystem, ensuring that it can be mounted
#
verify_runnable "both"
done
sync
+# ZoL issue #7432
+log_must zfs set compression=on xattr=sa $TESTPOOL/$TESTFS2
+log_must touch /$TESTPOOL/$TESTFS2/attrs
+log_must eval "python -c 'print \"a\" * 4096' | attr -s bigval /$TESTPOOL/$TESTFS2/attrs"
+
log_must zfs snapshot $TESTPOOL/$TESTFS2@now
log_must eval "zfs send -wR $TESTPOOL/$TESTFS2@now > $sendfile"