Date: Tue, 02 Jun 2015 15:17:23 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 199804] ZFS: i/o error - all block copies unavailable Message-ID: <bug-199804-3630-xfAHg4jRlB@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-199804-3630@https.bugs.freebsd.org/bugzilla/> References: <bug-199804-3630@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199804 --- Comment #2 from Toomas Soome <tsoome@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199804-3630-xfAHg4jRlB>