From owner-freebsd-fs@FreeBSD.ORG Wed Jun 3 11:21:45 2015 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BF46382 for ; Wed, 3 Jun 2015 11:21:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 25FA71700 for ; Wed, 3 Jun 2015 11:21:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t53BLjuc059949 for ; Wed, 3 Jun 2015 11:21:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 199804] ZFS: i/o error - all block copies unavailable Date: Wed, 03 Jun 2015 11:21:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 11:21:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199804 --- Comment #3 from Andriy Gapon --- (In reply to Toomas Soome from comment #2) I think this fix is not completely correct. Now you use the data block size as the hole size. I think that the hole size should be determined based on the level of the hole. Essentially, if the hole is at the zero level, then it covers dn_datablkszsec * 512 bytes of data (one data block). If the hole is one level above, then it covers as many data blocks as a number of block pointers that fit into one indirect block. And so on. Please note that (nlevels - i - 1) is the level number in the loop. E.g. search for BP_SPAN() that is used elsewhere for the same purpose. -- You are receiving this mail because: You are the assignee for the bug.