From owner-freebsd-geom@FreeBSD.ORG Sat Dec 20 06:01:00 2014 Return-Path: Delivered-To: freebsd-geom@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 A4E1172B for ; Sat, 20 Dec 2014 06:01:00 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3512B1312 for ; Sat, 20 Dec 2014 06:01:00 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id l2so2921336wgh.13 for ; Fri, 19 Dec 2014 22:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=kLdE4xKr6U+aQ3edEQXvcHM8G/OpK4dQ2OjFmxATOZ8=; b=Pzr4kgL8j4Bx86lhcXIgXzqKz6EV+x7colurj2vuYffAkZyfa5+M7CeJc1xbsa21A9 EBXsypRdzXL2b3vmnftgadouMCziHrLBLfx5sj6rQynqWanYhOFkLTrlY5AJ6mJHKsvC Mw5ZM0GEN3q3XRsJTwdB2kQZHe0ZiXOH07RKsZ/QgkjawmR2L8QegaiWYdgImEWmuoE6 eapOaY9GR8M/AqEdB8nrtLl3qEAAUx1UP5+7bvtitew5GkJ5YZwsOQEi5YBH9obd4G4V TtsrhdBpjulQzjtYk7+1In1SoClxONWtK/HWFVnJHtEauGR9JmXhYDjWQ8NvYJg6QtLh ywGw== MIME-Version: 1.0 X-Received: by 10.194.85.83 with SMTP id f19mr21994261wjz.20.1419055258534; Fri, 19 Dec 2014 22:00:58 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Fri, 19 Dec 2014 22:00:58 -0800 (PST) In-Reply-To: References: <20141219015210.GY25139@funkthat.com> Date: Fri, 19 Dec 2014 22:00:58 -0800 X-Google-Sender-Auth: Vjm1dfArlb5JRUWZEdkk161DS0c Message-ID: Subject: Re: Converting LBAs to byte offsets through the GEOM stack From: Adrian Chadd To: "Pokala, Ravi" Content-Type: text/plain; charset=UTF-8 Cc: John-Mark Gurney , "freebsd-geom@freebsd.org" X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2014 06:01:00 -0000 Hi, So when I did stuff like this back in the day, I also had to deal with some layers doing not just straight static translations, but things like dynamic sector remapping for what was effectively software error correction. Reaching "around" the layers with some mapping from virtual -> physical disk device and blocks ended up being problematic as between the time you did the lookup and the time you did the IO, the mapping could change. So when doing stuff like this, I ended up piggybacking commands through the translation layers, so stuff was done (a) in line with the rest of IO processing, and (b) wouldn't suffer from stale data. It doesn't matter as long as the translation stays static, but there's nothing in GEOM that requires you to have a static translation layer. :) -adrian