From owner-freebsd-fs@FreeBSD.ORG Sat Jun 13 09:43:52 2015 Return-Path: Delivered-To: freebsd-fs@hub.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 77FD3EC1; Sat, 13 Jun 2015 09:43:52 +0000 (UTC) (envelope-from felipemonteiro.carvalho@gmail.com) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F64A9AC; Sat, 13 Jun 2015 09:43:52 +0000 (UTC) (envelope-from felipemonteiro.carvalho@gmail.com) Received: by wgzl5 with SMTP id l5so12670678wgz.3; Sat, 13 Jun 2015 02:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=sszTDdDFWFhG0nRm2U8UecEhY5ypPtXzgME8EIh8zgQ=; b=PPybmkpBoQdXoyTYCnD4ggWby49MbZzxfAe5IOZrcVcevT+QkaIbeApwzz4BcbFpTk Fx+faKu2BJ4yctM7i2D0AJ8hJGxmNf5gdPxd47u2AkdNpyHlmG+AXHuSyLDwD/Q0k9Yk G4c4gc+BxZcVJvKucd7hz3eV16j0HHOrYhWcWL9MCuSBZCrI+U92GJiO+4/LfO8zYD24 ksEFi7oZUQ67HdjFL6vfC2Dknq6XmnnXuexk7w8iOlDLzY4v8aSmtHiSbAhpELLJL1c3 gotPiQ6lFUcbBmx9kJ2kLUBiUEXrOkGStQnxSvCaFK1zCug+opOPN1MWMLrB2HlDDS7I VWxg== X-Received: by 10.194.59.79 with SMTP id x15mr18034422wjq.81.1434188630212; Sat, 13 Jun 2015 02:43:50 -0700 (PDT) Received: from [37.7.124.51] (apn-37-7-124-51.dynamic.gprs.plus.pl. [37.7.124.51]) by mx.google.com with ESMTPSA id m4sm8160080wjb.37.2015.06.13.02.43.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 02:43:48 -0700 (PDT) References: <557B0255.8060809@freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <557B0255.8060809@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <01184F08-1C6B-4282-9203-1BF98F07A05A@gmail.com> Cc: "freebsd-fs@freebsd.org" X-Mailer: iPhone Mail (11D257) From: felipemonteiro.carvalho@gmail.com Subject: Re: Uberblock location Date: Sat, 13 Jun 2015 11:43:37 +0200 To: Julian Elischer 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: Sat, 13 Jun 2015 09:43:52 -0000 hello, Where can I find the source code that you are mentioning? I am reading the s= ource in https://github.com/zfsonlinux/zfs?files=3D1 but it is very large an= d so far I couldnt pinpoint where it finds the uberblock. Also the mention of bootblock confuses me since ita for booting while I am w= orking in a general case, not necessarely involving boot. thanks, Felipe Enviada do meu iPhone > Em 12/06/2015, =C3=A0s 18:01, Julian Elischer escreve= u: >=20 >> On 6/12/15 9:49 PM, Felipe Monteiro de Carvalho wrote: >> Hello, >>=20 >> I am writing a program to read ZFS partitions, and although I already >> read a lot of documentation, there is 1 problem which is blocking me: >> How does the driver find the uberblock? >>=20 >> I know, I can just get any test volume, find the ZFS uberblock and in >> my case it is positioned in 0x20C00 and there are lots and lots of >> copies (older versions?) of it. >>=20 >> But there is no guarantee that it doesn't just happen to be in this >> position in my image and in another version it would be elsewhere, so >> I need the algorithm utilized to find it. >=20 > I presume you have looked at the zfs reading library in the bootblocks? >=20 >>=20 >> Any ideas? >>=20 >> thanks, >=20