svn commit: r284025 - head/sys/boot/zfs
Andriy Gapon
avg at FreeBSD.org
Fri Jun 5 15:32:05 UTC 2015
Author: avg
Date: Fri Jun 5 15:32:04 2015
New Revision: 284025
URL: https://svnweb.freebsd.org/changeset/base/284025
Log:
dnode_read: handle hole blocks in zfs boot code
A hole block pointer can be encountered at any level and the hole
can cover multiple data blocks, but we are reading the data blocks
one by one, so we care only about the current one.
PR: 199804
Reported by: Toomas Soome <tsoome at me.com>
Submitted by: Toomas Soome <tsoome at me.com> (earlier version)
Tested by: Toomas Soome <tsoome at me.com>
MFC after: 11 days
Modified:
head/sys/boot/zfs/zfsimpl.c
Modified: head/sys/boot/zfs/zfsimpl.c
==============================================================================
--- head/sys/boot/zfs/zfsimpl.c Fri Jun 5 15:16:26 2015 (r284024)
+++ head/sys/boot/zfs/zfsimpl.c Fri Jun 5 15:32:04 2015 (r284025)
@@ -1255,6 +1255,10 @@ dnode_read(const spa_t *spa, const dnode
ibn = bn >> ((nlevels - i - 1) * ibshift);
ibn &= ((1 << ibshift) - 1);
bp = indbp[ibn];
+ if (BP_IS_HOLE(bp)) {
+ memset(dnode_cache_buf, 0, bsize);
+ break;
+ }
rc = zio_read(spa, &bp, dnode_cache_buf);
if (rc)
return (rc);
More information about the svn-src-all
mailing list