Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2015 15:32:05 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284025 - head/sys/boot/zfs
Message-ID:  <201506051532.t55FW5Cl071702@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@me.com>
  Submitted by:	Toomas Soome <tsoome@me.com> (earlier version)
  Tested by:	Toomas Soome <tsoome@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506051532.t55FW5Cl071702>