[Bug 199804] ZFS: i/o error - all block copies unavailable
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jun 2 15:17:23 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199804
--- Comment #2 from Toomas Soome <tsoome at me.com> ---
actually the fix itself is buggy:) the basic idea is correct, but the size of
the zero filled buffer is wrong, the correct code is:
if (BP_IS_HOLE(&bp)) {
memset(dnode_cache_buf, 0,
dnode->dn_datablkszsec <<
SPA_MINBLOCKSHIFT);
rc = 0;
} else
rc = zio_read(spa, &bp, dnode_cache_buf);
as the BP_PSIZE() or BP_LSIZE() is 512B at that point (for 512B sector size at
least), and indicates the size of BP itself, not the size of the hole - so the
original (bad) fix did zero out only first 512B and rest of the buffer did
return garbage.
This fix is verified by hashing the whole file and checking against file on
disk and file read to memory by this reader code.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-fs
mailing list