mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix issues with raw sends of spill blocks
This patch fixes 2 issues in how spill blocks are processed during raw sends. The first problem is that compressed spill blocks were using the logical length rather than the physical length to determine how much data to dump into the send stream. The second issue is a typo that caused the spill record's object number to be used where the objset's ID number was required. Both issues have been corrected, and the payload_size is now printed in zstreamdump for future debugging. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #7378 Closes #7432
This commit is contained in:
committed by
Brian Behlendorf
parent
e14a32b1c8
commit
b0ee5946aa
@@ -614,6 +614,9 @@ main(int argc, char *argv[])
|
||||
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);
|
||||
@@ -626,19 +629,21 @@ main(int argc, char *argv[])
|
||||
"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:
|
||||
|
||||
Reference in New Issue
Block a user