From owner-svn-src-all@FreeBSD.ORG Fri Jun 5 15:32:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5878A496; Fri, 5 Jun 2015 15:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 468C21D6C; Fri, 5 Jun 2015 15:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t55FW5lv071703; Fri, 5 Jun 2015 15:32:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t55FW5Cl071702; Fri, 5 Jun 2015 15:32:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506051532.t55FW5Cl071702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jun 2015 15:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284025 - head/sys/boot/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2015 15:32:05 -0000 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 Submitted by: Toomas Soome (earlier version) Tested by: Toomas Soome 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);