From patchwork Fri Feb 19 01:49:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiva Krishna X-Patchwork-Id: 8355321 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 44358C0553 for ; Fri, 19 Feb 2016 01:53:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A8A9203B5 for ; Fri, 19 Feb 2016 01:53:26 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E3DA1202E9 for ; Fri, 19 Feb 2016 01:53:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u1J1nnpE017844; Thu, 18 Feb 2016 20:49:50 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u1J1nmTx011894 for ; Thu, 18 Feb 2016 20:49:48 -0500 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1J1nmpL007458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 18 Feb 2016 20:49:48 -0500 Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0063.outbound.protection.outlook.com [157.56.111.63]) by mx1.redhat.com (Postfix) with ESMTPS id EE99F341442; Fri, 19 Feb 2016 01:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nimblestorage4.onmicrosoft.com; s=selector1-nimblestorage-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xrSzD0Q9n9j4EGYeOc55jjcaHJVwguZnV8uJFxK/4nU=; b=tDOsDN/4JtYJqmWAuAnuJfqzwPlmzNPNH1EOF756xKbWzL+NhiS7hfPG9qQ9LjiUiw/tlVzJK2q5uDeTrrt19iX33cR9/h1YAPWBoFv2WRIBFelj0JSNKQQD6GLSDXiSpTJt90omem4nvF3xHGiTqW+GRmVTzL7jHWp1kMOPTx8= Received: from BY2PR02CA0108.namprd02.prod.outlook.com (10.163.44.162) by BLUPR02MB1220.namprd02.prod.outlook.com (10.163.80.15) with Microsoft SMTP Server (TLS) id 15.1.409.15; Fri, 19 Feb 2016 01:49:45 +0000 Received: from BY2FFO11OLC007.protection.gbl (2a01:111:f400:7c0c::101) by BY2PR02CA0108.outlook.office365.com (2a01:111:e400:5261::34) with Microsoft SMTP Server (TLS) id 15.1.409.15 via Frontend Transport; Fri, 19 Feb 2016 01:49:45 +0000 Authentication-Results: spf=pass (sender IP is 198.54.169.104) smtp.mailfrom=nimblestorage.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=nimblestorage.com; Received-SPF: Pass (protection.outlook.com: domain of nimblestorage.com designates 198.54.169.104 as permitted sender) receiver=protection.outlook.com; client-ip=198.54.169.104; helo=mail.nimblestorage.com; Received: from mail.nimblestorage.com (198.54.169.104) by BY2FFO11OLC007.mail.protection.outlook.com (10.1.14.254) with Microsoft SMTP Server (TLS) id 15.1.415.6 via Frontend Transport; Fri, 19 Feb 2016 01:49:44 +0000 Received: from SJC-MBX-03.nimblestorage.com ([fe80::84bf:bbc4:41c5:ecad]) by cashub01.nimblestorage.com ([::1]) with mapi id 14.03.0235.001; Thu, 18 Feb 2016 17:49:40 -0800 From: Shiva Krishna To: device-mapper development Thread-Topic: [PATCH]multipath-tools: select reservation_key parameter before PR handler for first path addition to new map Thread-Index: AQHRarfMuMn5a0rDB0uoaB09mHWFCQ== Date: Fri, 19 Feb 2016 01:49:40 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.42.32] MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC007; 1:VvxoR1N62xxh/EO5zNtGcCYjzsNnRcWyCNk5aEsPf2QnLMc3ZQbtAvJCJDg9BPHbV3yBGYSTEUGxyyZCDpCBy97/OX/6G8JjzA/xettqbOSfjED3Uac2y6ifzTD/BTtRPGND6CLOUxKUqetFoQJS5ttizRaJKsVvrMd389uhUmyLDKDhg8p3uQTuN1KaXFDHDScS0SffooIIf9SA0JSJx7xzu4KTRwfd00XlIqUhRx9EUGESutAw0hqvJe45kaYGT1V7lwHHN2eKsNg7iF0PEp6qglPAjhPDSo1EBQeZSeifn7/7xxB7u7e0cWQT07KnJCn4dVa3hk7vihV+m2X11f0St1eVS2UB3+FmKT8QVhY= X-Forefront-Antispam-Report: CIP:198.54.169.104; CTRY:ZA; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(50986999)(189998001)(229853001)(19580405001)(86362001)(84326002)(110136002)(19580395003)(104016004)(106116001)(6806005)(260700001)(16236675004)(5001960100002)(54356999)(11100500001)(575784001)(5003600100002)(300700001)(53416004)(36756003)(586003)(87936001)(1220700001)(5008740100001)(6116002)(1096002)(92566002)(2906002)(5004730100002)(30436002)(106466001)(5250100002)(512954002)(2900100001)(3846002)(4326007)(4546004)(102836003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB1220; H:mail.nimblestorage.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1220; 2:EQ9gQTYStDnVz8vd0IKiF/tQLEc0OFr5C+c7m+SWfl5EfHbdXvXvzSOPnMJW+XzMD0lXBAXECdTkRFXUhad089/5l07ExsmIfLjvl/QdpDqIKdo5JC2e40tJUaij618hhCS1DZUInFFFtyKOgZfUig==; 3:TahH5WtGHa7u2Ye0QuR8k3JGNSxpecU+hEKKCtA6fYHc003xoaI2eow4LWiRRrGoBE9UInkfhEpzcgXYCaAElYA7ImvzHhcx/fOArCQGk2od3MwEGUs2uPK+r7Izi8r9dxvJddaSwSZ6qQvPI9UYCbnlJr7iAavC/HCQk18dGUTC/SIr8djCZOPNlTF1vQUHm7kSrJBxVeZjsgx75/oqcQkyxVkyyOeZuMwNRNJK8kIeajO8zyW+03Ic9Kmtp068a09z74ENj8sBOJ/c4Zg8bA==; 25:eNYdimrvzMMO9HP4mlhGzsqYYrWjqjgKVK6DROb1j1JmqiZLg9xWIqqNvgL2G2edjG1lqzhPnqQwRbhByPo8sHGR3gsgVh5cwdhO6eyTAdxCLwu0Cr3gDxkZDy6xxbc1NKRpDvMOt/Ts4AT4wX0cEDy7jsVLlA1zIV0tGDgwh4Q24Mvxx1yWMD7PAe2Tcy5ALwps012Vf3vmXrjb14NpcWUQHURS313Wj5OjBYy8hn/GCE2++6cbpsCHq1ePHnPWQebhONcb5j0s538xSqu84Y8c/tAiwqTnXzbBVmACDrqzaPQ1e613MUKyszwJv74W X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BLUPR02MB1220; X-MS-Office365-Filtering-Correlation-Id: 052acb5c-2247-4270-2f32-08d338cef0c1 X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1220; 20:XXueaP8PS4cQGa2Tw/CEFyaneLuPq8r3I3NhwNyc347GENVWruZYJi6bXV30c8O0wqIb34ma7L51BC1Bu+PgqUH8oBqAWgQYf74/EHEWUSAiM0Pg2SaHqgFl1tMEpq5MVBuRgMULBXfX5aHvufPfuGTliMgPAoOErGtIOm1y+OkBsX3j4PkGpzwvSUi+9tLE3XvU2UJciE9Kn5m8Hhbe+chMp7erWxfo9x6nt0P7xE4GrVlO7MwL6K4ygbsNSJdOuo27YEOquOZ3J7NPb5EHkgPmjuba+UERjPTpnE1x4wCVO0MkRZRQ+jOeZ+eilH7ooQ8cTAFI0ixEI4aDW+lXum3qP6NC47v+gaDk79rLfYIM0S8RvZL+I3yOkfuw64+AYkodNRKvW9WkdMN2TLah0RnZpqixE1QuwYIOSSZpz/bAqBTUbBSIc03vo35JcT2YcNV1MK9tc3G89weGeExL/hBouIhTVK4k7MCT4O8btiyKdp3RlpM4XCpCBEt6jLUf3pqTpJ3PFp7x4P8eaWb1X0S4sPUrz8Ct3KVVmdzUM0ubYn119wfXsUxrWwwnvG8nvJfEBZsXH3ezfxZFrf/C0gymXttFi2Fr88ykTqH41pU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(208970940250505); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(13023025)(3002001)(10201501046); SRVR:BLUPR02MB1220; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB1220; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1220; 4:+9ykMaHPptnxmCqIMi9yIGrq/ZiwVcCbE5y7DgLfkonAZCahelB793r3yjkjg1jZ56YlCBBAP/QxQkVX3JK2qRFLt/ZWLCF9nKHYxVd5rP7QEcNfEX9Q6HfimSKGVkC3IHvJ0SzhDF0WIRqUYiYONPLa/gXMzwNnxmsqoAM6icodG5GxNn3R3QuzemjaUefCsSnhtDMC1wvEiQPaIF4IL9bktSlnOfiD5lwOifxwQHWjXmN11o3YkIbFLSqQRRecm7encgetAIVolHl2KkJdbhPQecFhnNBsRerXonF1AE1/MsGD04v0xR4KIXP1jVcwAIHZwjsYPSVQEFe9miH+MyuA6tY35yguogkLoFerI5Y3Cb1dvusJvjVLrRyKXcIEHw6lEpMU/D0EpCq6XFLG2B+ivXpTqHUrgj78fiyvnO/PuVhc8sZGAPNhpnqhLlmJVsRiqoZ8x7BpxX8dCUbzVPioBVuruYQjNooryeHPd6o= X-Forefront-PRVS: 08572BD77F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR02MB1220; 23:X5TsB4Si9cD54lmMXbjpEM9XrFRAg897aG7oaRmgk?= =?us-ascii?Q?ErK6x+7eXpop5mnpJiSusavLCECLl/hyB/bHzGcaaH9oeoN5cQRZy48hmxea?= =?us-ascii?Q?N+W+e6E8ay2+Dg90sgLD/4RrGbITa5P9I4H7W+BlgR32OnWDId2NBiNWrZqk?= =?us-ascii?Q?rrggT/phrf0yHRVZtG4kaM01KURu6EEETt9imc8BbVTGNXHWjQ5HcEGU+juy?= =?us-ascii?Q?VYG/M8KwshPiewGXorY4zD1agFsD0F7RYFAvxn90VqIOuY2BhfDB9S4yCm0H?= =?us-ascii?Q?nDn9ggxQLt8BYLBS2U2h7SiWZ0/CSPgu7HMc+uqGlCU2qeRY2CNvMblQQUKu?= =?us-ascii?Q?zqA60FKeXiou5jwcQTnbwWg5BtwrEjs2d19AjYhyewuA9mhg8hlakWQv9jfF?= =?us-ascii?Q?Kgq2zg4cZwbEGE/c7OflvT0nk0FNgDws6QB+6boA+G7SMZ5pTDMX0BHKGEHv?= =?us-ascii?Q?9+wBZNbFS5uOx7tnj6rfeRveqQpJoH8bSu+tG9hABrzqDvR0hdSolWPq8NX8?= =?us-ascii?Q?rcSlFsiqNCxcK2qyTtrOySnr8FTx+4NT+BajAZNSoQvV0HH+q/5+97qUpMkz?= =?us-ascii?Q?gs6bxEU5H2w9tav+gNki38XZCV03dT64vPZov+kJ1DVSUB/2xdKJz82APmSP?= =?us-ascii?Q?ErLY8SJXESF1lSP0abGaqF0+mEFnMzOoWTitc7D8wqDqWUUwe4YtU6CUkewd?= =?us-ascii?Q?YeLagFSP8Kl4MugbRfLWWVj2KxQqMt9A0WZletpLn8s5QegalGBxeNf8CCxb?= =?us-ascii?Q?QhtSukra7UJODRHIfNvAMGImMDdKUzDW3Pw4dLyriMfmH29eMnrYMVPR+XD5?= =?us-ascii?Q?ViQWVvigSunUlpmz8vLctuenZZv7Yyh7ToIsfiEPot/6DTiyZMpqAWW0/usc?= =?us-ascii?Q?gRqKwMAIXEhIPRo39iecA706UB2p/eNNna2Zv9OxETEcREFZ864DL/f5GhpC?= =?us-ascii?Q?6vxu+GTwJPBKC4bcxn+sRX7iGr0hCCVkcpb5tWqSsZCT7JU7HzCvrpfkDo5r?= =?us-ascii?Q?9CvvZI0AROCiYRw71eJ1M7u/BxarGWddrC2ACxTKTGiiWXGBLVIZBiaA9o2L?= =?us-ascii?Q?ZrWQcQzxCVogz1vawMeL+aeXDN1gZVq4cDdLA0bxyUKZ2HKtgk756caOjsP+?= =?us-ascii?Q?j6WqEdPQoAuHz+qkjjyC/KVgzdG8u/Gq7YZNFaPN/7tjMpFNV9tHZapKs/X2?= =?us-ascii?Q?ZYzC8aFykkOJ18=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1220; 5:Skah2lqcEqL0InAQqlnb3mYwZ5bIIFWG9dhoiLBkUankwtMWPRMh5prUQPtBnXFZkrnnv/J4gKREhjyt+b3N+QlsBcNPSn+Nw6qxVf/Uuq6LPagK0UUR4KPT9Eg8Vw3DmOvE3LIKQ0J5hZPM3ecYbw==; 24:0Y82lCw0FwsOZCSSnGWj4EOikNUyVU3AWq6sTYILAllj/rq6Cg17HUQ/NoifQafCrsgmbK/O6NEvb+aAWJPh4T4Mx6Xc8QVSFS3kyFVmR9I= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nimblestorage.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2016 01:49:44.0954 (UTC) X-MS-Exchange-CrossTenant-Id: 84f04a72-ca5d-479c-b48d-72d80f13b585 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=84f04a72-ca5d-479c-b48d-72d80f13b585; Ip=[198.54.169.104]; Helo=[mail.nimblestorage.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB1220 X-RedHat-Spam-Score: 0.388 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS) 157.56.111.63 mail-bn1bon0063.outbound.protection.outlook.com 157.56.111.63 mail-bn1bon0063.outbound.protection.outlook.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH]multipath-tools: select reservation_key parameter before PR handler for first path addition to new map X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, HTML_MESSAGE, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On addition of first path, reservation_key parameter is not selected before handling persistent reservations. This leads multipathd to not perform registration on the path even when registrations exist on the LUN. Added code to select "reservation_key" parameter value before calling PR handler during addition of new path to a new map. Signed-off-by: ShivaKrishna Merla --- libmultipath/configure.c | 5 ++++- multipathd/main.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletions(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 24ad948..2071aa4 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -287,7 +287,10 @@ setup_map (struct multipath * mpp, char * params, int params_size) select_gid(mpp); select_fast_io_fail(mpp); select_dev_loss(mpp); - select_reservation_key(mpp); + + if (!mpp->reservation_key) + select_reservation_key(mpp); + select_retain_hwhandler(mpp); select_deferred_remove(mpp); select_delay_watch_checks(mpp); diff --git a/multipathd/main.c b/multipathd/main.c index 04f6d02..bf3423f 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -539,6 +539,8 @@ rescan: goto fail; /* leave path added to pathvec */ } + /* select configured reservation key */ + select_reservation_key(mpp); /* persistent reseravtion check*/ mpath_pr_event_handle(pp); --