From owner-freebsd-geom@freebsd.org Tue Oct 27 02:37:58 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 021FAA1D055; Tue, 27 Oct 2015 02:37:58 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0078.outbound.protection.outlook.com [207.46.100.78]) (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 2A42F1324; Tue, 27 Oct 2015 02:37:56 +0000 (UTC) (envelope-from rpokala@panasas.com) Received: from CY1PR08MB1803.namprd08.prod.outlook.com (10.162.218.25) by CY1PR08MB1801.namprd08.prod.outlook.com (10.162.218.23) with Microsoft SMTP Server (TLS) id 15.1.306.13; Tue, 27 Oct 2015 02:22:34 +0000 Received: from CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) by CY1PR08MB1803.namprd08.prod.outlook.com ([10.162.218.25]) with mapi id 15.01.0306.003; Tue, 27 Oct 2015 02:22:33 +0000 From: "Pokala, Ravi" To: "freebsd-geom@freebsd.org" , "freebsd-scsi@freebsd.org" , "freebsd-hackers@freebsd.org" CC: "scottl@freebsd.org" , "ken@freebsd.org" , "imp@freebsd.org" Subject: Low-level trace-buffers in CAM Thread-Topic: Low-level trace-buffers in CAM Thread-Index: AQHREF5W2DCPOIdjUUGMRg6fRJs3ww== Date: Tue, 27 Oct 2015 02:22:33 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/0.0.0.151008 authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpokala@panasas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [64.80.217.3] x-microsoft-exchange-diagnostics: 1; CY1PR08MB1801; 5:bosRlMo+g5nFNnVCd6VhdoW/KG7GwEI4ZwVLrSTlJyHnJ3YC6qs41zWI4lE8cdAeOibcn0ZaPsO7nwIWzyfuS/43d9PWVKB5CqZ8ci6TZ5+K9Zp0AMyptFIA0XVgDdYBijhaBdVBFLPLVpEL9wsA2g==; 24:LUH48ETZdrNqLm82CtRWwkez6aCQ9C3kNBIFOnZAc7Lxdcp6aaujf94y4Zs1uFGrZiEZ7i7Bkmift25i3RMig7wVrFV8CAwAQs4ZZ6N1b8s=; 20:kkNZ5fBwStuD6qepFW788DbYHqGCO3OhxX2Hm2mZRcpFXZfv4Nw9g92mDGvIREXd7Ek4XXNWKhHUSreX11I6Lw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR08MB1801; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(102215026); SRVR:CY1PR08MB1801; BCL:0; PCL:0; RULEID:; SRVR:CY1PR08MB1801; x-forefront-prvs: 0742443479 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(164054003)(189002)(189998001)(66066001)(5004730100002)(33656002)(5007970100001)(2900100001)(5008740100001)(551934003)(5001960100002)(229853001)(10400500002)(77096005)(2501003)(102836002)(92566002)(5002640100001)(81156007)(5001770100001)(97736004)(83506001)(82746002)(450100001)(106116001)(87936001)(40100003)(122556002)(105586002)(575784001)(86362001)(36756003)(99286002)(106356001)(50986999)(101416001)(2201001)(54356999)(83716003)(4001350100001)(427584002)(21314002)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR08MB1801; H:CY1PR08MB1803.namprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: panasas.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2015 02:22:33.6380 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR08MB1801 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 02:37:58 -0000 SGkgZm9sa3MsDQoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0NClRoaXMgaXMgYW4gdXBkYXRlZCByZS1zZW5kIG9mIGEgbWVz c2FnZSBJIG9yaWdpbmFsbHkgc2VudCBhYm91dCBhIHllYXIgYWdvLCBkdXJpbmcgTWVldEJTRCAy MDE0LiBBIGZldyBwZW9wbGUgZXhwcmVzc2VkIGludGVyZXN0IGluIHBlcnNvbiwgYnV0IG5vIG9u ZSBldmVyIGZvbGxvd2VkIHVwIG9uIHRoZSBsaXN0cy4gSSdtIGJyaW5naW5nIHRoaXMgdXAgYWdh aW4sIGluIHRoZSBob3BlcyB0aGF0IEkgY2FuIGdldCBzb21lIGZlZWRiYWNrIGJlZm9yZSAvIGR1 cmluZyBuZXh0IHdlZWsncyBEZXYvVmVuZG9yIFN1bW1pdC4gSSdtIENDaW5nIHNvbWUgZm9sa3Mg d2hvIGV4cHJlc3NlZCBpbnRlcmVzdCBhdCB0aGF0IHRpbWUsIGFuZCBzb21lIGZvbGtzIHRoYXQg SSB3YXMgdG9sZCB3b3VsZCBiZSBpbnRlcmVzdGVkL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ICAgICAgUkVTUE9OU0UgQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAg IA0KICAgIC0tLS0tLS0tLS0tIC0tLS0tLS0tLS0tLS0tLS0tLS0tIC0tLS0tLS0tLS0tLS0tLS0t LS0tIC0tLS0tLS0tLS0tLS0tLS0tLS0tIA0KICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tIC0tLS0tLS0tIC0tLS0tLS0tIA0KICAgICAgICAtLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQogICAgX19fX0MuLi4uX1YgMTQ0NTgzOTc5 MzAwMzczNyAgICAgMTQ0NTgzOTc5MzAwMzgwNiAgICAgNjkgICAgICAgICAgICAgICAgICAgDQog ICAgICAgIFJFQUQgRE1BIChMQkEgMTIyMDAgKyA0IHNlY3RvcnMpICAgICAgICAgX1JfU19fX18g X19fX19fX18gDQogICAgICAgIC0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICANCiAgICBfX19fQy4uLi5fViAxNDQ1ODM5NzkzMDAzODc0ICAgICAxNDQ1ODM5NzkzMDExNTQx ICAgICA3NjY3ICAgICAgICAgICAgICAgICANCiAgICAgICAgUkVBRCBETUEgKExCQSAxMTI5MTYw ICsgMzIgc2VjdG9ycykgICAgICBfUl9TX19fXyBfX19fX19fXyANCiAgICAgICAgLS0tLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgIF9fX19DLi4uLl9WIDE0NDU4Mzk3 OTMwMTE3OTUgICAgIDE0NDU4Mzk3OTMwMTc3MDIgICAgIDU5MDcgICAgICAgICAgICAgICAgIA0K ICAgICAgICBSRUFEIERNQSAoTEJBIDExNTAxMjAgKyA4IHNlY3RvcnMpICAgICAgIF9SX1NfX19f IF9fX19fX19fIA0KICAgICAgICAtLS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgDQogICAgX19fX0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