From owner-freebsd-geom@FreeBSD.ORG Sun Dec 28 21:21:22 2014 Return-Path: Delivered-To: freebsd-geom@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 6F49FA36; Sun, 28 Dec 2014 21:21:22 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0071.outbound.protection.outlook.com [65.55.169.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E94AF17B5; Sun, 28 Dec 2014 21:21:21 +0000 (UTC) Received: from DM2PR0801MB0944.namprd08.prod.outlook.com (25.160.131.27) by DM2PR0801MB0941.namprd08.prod.outlook.com (25.160.131.24) with Microsoft SMTP Server (TLS) id 15.1.49.12; Sun, 28 Dec 2014 19:48:33 +0000 Received: from DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) by DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) with mapi id 15.01.0049.002; Sun, 28 Dec 2014 19:48:33 +0000 From: "Pokala, Ravi" To: Adrian Chadd Subject: Re: Converting LBAs to byte offsets through the GEOM stack Thread-Topic: Converting LBAs to byte offsets through the GEOM stack Thread-Index: AQHQGxf+kE6X/QdjbU+vuIDpLz2I5ZyWJp0A//9/yoCAAlgOAIAAYqmAgACXpICADBr4AA== Date: Sun, 28 Dec 2014 19:48:32 +0000 Message-ID: References: <20141219015210.GY25139@funkthat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.7.141117 x-originating-ip: [98.198.65.138] authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpokala@panasas.com; x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0801MB0941; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:; SRVR:DM2PR0801MB0941; x-forefront-prvs: 0439571D1D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(51704005)(199003)(189002)(83506001)(66066001)(86362001)(122556002)(97736003)(46102003)(93886004)(110136001)(54356999)(50986999)(76176999)(2656002)(99396003)(120916001)(31966008)(4396001)(36756003)(101416001)(87936001)(21056001)(62966003)(77156002)(105586002)(20776003)(64706001)(2950100001)(99286002)(40100003)(92566001)(102836002)(2900100001)(106356001)(68736005)(107046002)(106116001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0801MB0941; H:DM2PR0801MB0944.namprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) Content-Type: text/plain; charset="us-ascii" Content-ID: <088C9303B9C8D44E8D416A90D37D778C@namprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2014 19:48:32.7021 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0801MB0941 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: Sun, 28 Dec 2014 21:21:22 -0000 Hi Adrian, >So I had a thing that I attached commands to that would funnel down to >the geom layer that did this mirroring/caching/remapping thing, and it >would handle schedule the commands to whatever block(s) on whatever >disk(s) actually represented that particular logical offset. I actually >had something that'd let me issue commands that would map to a single >command to a single disk, or could be replicated to multiple commands to >multiple disks (and then i'd just get the completion from them all in the >reply message, as the bio didn't have enough space to write multiple >block reads into, and mostly I was issuing status check commands like you >are. :) > >Is that making more sense? I can whiteboard it up next time we're in the >same place. That would be very helpful. :-) Next BAFUG? -Ravi From owner-freebsd-geom@FreeBSD.ORG Sun Dec 28 21:39:18 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 5D2011CC for ; Sun, 28 Dec 2014 21:39:18 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (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 DEF6D1A0E for ; Sun, 28 Dec 2014 21:39:17 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y19so17751126wgg.28 for ; Sun, 28 Dec 2014 13:39:16 -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=IWYWga+jY2VTDc8QpZnSCGeeiphAbqEmljH+5qqZOf0=; b=sdpJTcJDBi5KyFehZkrux9udYo+EAPdHTAHuSs9sb73rsu7xSuhLy9WboMa0p296Z8 KvXEa3496E6y8Zw5GE03xWa8GFb6REt4AEUdltySN/E+53/yV0BYWtcX70uVKd/pOU16 yRlzw1Do/YXONeQQdo8zxmrbBze/LejIvoH4Xl7AApfs0Xbd/XC1NuDwUfcgBwbokb6G m8R1vb13Od9jAt2nEMKeRaqYtJI6L3ENT+zjJzTMb9XcYEGExjJjSl6dTEkOj6iHluy5 0RouA0uwpi+baLX+MJRKYmMxpHaotyj8wLMNOO2xSczqKR0gQAhP8y0RbpACgQWFsvpZ BFlQ== MIME-Version: 1.0 X-Received: by 10.180.7.198 with SMTP id l6mr89941244wia.26.1419802756360; Sun, 28 Dec 2014 13:39:16 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.195 with HTTP; Sun, 28 Dec 2014 13:39:16 -0800 (PST) In-Reply-To: References: <20141219015210.GY25139@funkthat.com> Date: Sun, 28 Dec 2014 13:39:16 -0800 X-Google-Sender-Auth: -Q-z_eIEu-kGfG6Lzn4ERlI5C-A 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: Sun, 28 Dec 2014 21:39:18 -0000 On 28 December 2014 at 11:48, Pokala, Ravi wrote: > Hi Adrian, > >>So I had a thing that I attached commands to that would funnel down to >>the geom layer that did this mirroring/caching/remapping thing, and it >>would handle schedule the commands to whatever block(s) on whatever >>disk(s) actually represented that particular logical offset. I actually >>had something that'd let me issue commands that would map to a single >>command to a single disk, or could be replicated to multiple commands to >>multiple disks (and then i'd just get the completion from them all in the >>reply message, as the bio didn't have enough space to write multiple >>block reads into, and mostly I was issuing status check commands like you >>are. :) >> >>Is that making more sense? I can whiteboard it up next time we're in the >>same place. > > That would be very helpful. :-) Next BAFUG? Sure thing. -adrian From owner-freebsd-geom@FreeBSD.ORG Sun Dec 28 23:44:04 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 0A7F2EC5; Sun, 28 Dec 2014 23:44:04 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0069.outbound.protection.outlook.com [207.46.100.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 968F31D6A; Sun, 28 Dec 2014 23:44:02 +0000 (UTC) Received: from DM2PR0801MB0944.namprd08.prod.outlook.com (25.160.131.27) by DM2PR0801MB0942.namprd08.prod.outlook.com (25.160.131.25) with Microsoft SMTP Server (TLS) id 15.1.49.12; Sun, 28 Dec 2014 20:09:54 +0000 Received: from DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) by DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) with mapi id 15.01.0049.002; Sun, 28 Dec 2014 20:09:54 +0000 From: "Pokala, Ravi" To: Poul-Henning Kamp , Adrian Chadd Subject: Re: Converting LBAs to byte offsets through the GEOM stack Thread-Topic: Converting LBAs to byte offsets through the GEOM stack Thread-Index: AQHQGxf+kE6X/QdjbU+vuIDpLz2I5ZyWJp0A//9/yoCAAlgOAIAAYqmAgACXpICAAAbDgIAMGi+A Date: Sun, 28 Dec 2014 20:09:54 +0000 Message-ID: References: <20141219015210.GY25139@funkthat.com> <13564.1419110461@critter.freebsd.dk> In-Reply-To: <13564.1419110461@critter.freebsd.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.7.141117 x-originating-ip: [98.198.65.138] authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpokala@panasas.com; x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0801MB0942; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:; SRVR:DM2PR0801MB0942; x-forefront-prvs: 0439571D1D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(164054003)(86362001)(36756003)(101416001)(50986999)(97736003)(99396003)(77156002)(83506001)(62966003)(120916001)(93886004)(2656002)(122556002)(4396001)(54356999)(21056001)(76176999)(92566001)(40100003)(46102003)(2900100001)(105586002)(2950100001)(106356001)(106116001)(68736005)(66066001)(102836002)(31966008)(99286002)(64706001)(20776003)(87936001)(107046002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0801MB0942; H:DM2PR0801MB0944.namprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2014 20:09:54.6630 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0801MB0942 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: Sun, 28 Dec 2014 23:44:04 -0000 Hi Poul-Henning, >If this were important, the geom(8) tool could probably do it, based on >the exported XML state of the geom-mesh and support modules mirroring >actual logic for all relevant geoms, that way it would at least live in >userland. I did some digging in our source tree, and it turns out that someone implemented something like that (userland tool, using geom_gettree() to get the mesh, forward- and reverse-map for various GEOMs) for some of the GEOMs we use. Unfortunately, some of the important classes were left out, and it requires changes for each additional class we want to support. And, as several people have mentioned, it only works for classes which perform fixed mappings rather than dynamic mappings. The good news is, I'm only interested in static mappings, so I should be able to come up with something to fulfill my needs. With those caveats (code required for each additional class, only works for static mappings), would this be something others are interested in having? Thanks, Ravi