From patchwork Tue Aug 13 09:40:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13761670 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35F49183CA6 for ; Tue, 13 Aug 2024 09:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723542106; cv=none; b=CZoGEnzyv50xqEI+B3QrGGl1cxngpDNy8De/ez0koT6o/2R5AbzEwe18jjnxifEXv+KgFPTo/3JuHCGrc4+1zEx6IJAtbzeAB7iF8j2orBzK2kAicISWFNWiWy+isntoIsPgUVjYyMWXZoR8WHdSC5J1M8ANiOKYVPqYgBxk4bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723542106; c=relaxed/simple; bh=sRvN9XgyXiTZOpKlVkafyP1TCYvXGNj3L41j51u9WmA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CQwDSUta4mHmMJf9H7Qxv+9echg53eeenlMjvDx1MMjsathvnjBVeNQCaRWiuCDiPXqijMHVmwa1DcOSn6Nct14mkYyBmnK1nsXX0IlzzF3y1KmeiT0x+lJWlCbbwoCyMHsa0RCj7GMVKW9870Om6esyc3x0xMyh7AeQ5zFVDSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=BSayWTRl; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="BSayWTRl" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a7a9e25008aso68895766b.0 for ; Tue, 13 Aug 2024 02:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723542102; x=1724146902; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4Fo9LICpxTPtb/Y2ahPZj5XEhi6E/QzStAAryutPs9Q=; b=BSayWTRlw5eDblFVbkC+8r8YZQhK/gn718F3CNa6ULWo0XUtRZ1KyZSxIRR6kljS8F Az9xEsuI0C7df9yE3Z9CirBYpK1/0rhHpqqTQj/NtNAiArD8zoifHO3/9O1Ph+fh1O1h qNpvhdF6d8I0e831NfI79HlCugZl80UvQ29k5zdHgWy6sMM+YtxahePlf2QlCZaUykMH N9Ub6vPSWI1d+llCNbJ1TC84vpvHxvwq1PNd8eBju8O//HOyaq5ZBN7kacUmErjnxeo5 L/jWq2TEP+UFxbiqqsl+gNRdsVyXIsNbhhaUfGnDZncB1AfRkl6EvjfjvKAW9LmGa7md v4Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723542102; x=1724146902; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4Fo9LICpxTPtb/Y2ahPZj5XEhi6E/QzStAAryutPs9Q=; b=Xh+7ajEi/nxd8whDacI8zbn68FyjTX2a4nWCJZpdRBQOsZBRKpkjuIzuCLztnE7P5s zw1jHFYHjTosCSR0/C5BV0vFAglt4bqXn3Gp5gMEYO9jcagk/owyW5eaiQWc1wsvFQCF z50Dv4zhGt73oDXG5xOtnmQX0MSqx8ZcUvXDzEKE8NGTBzQAtB4JLjyDjTfNCqaA8tKA 7KlN4qldQdvicTgtzGOpDjsHvdAvWYlu8rRMrv72fcSpivMnSN75rv5WzuPW+P8qLq5e axyV2Zcw6uCq3y6Xpfpa8iwu2PN8hVbOBAk4FzAmjyOFFwl6HdUYElvF4M0SKdCHxlil ZKcQ== X-Gm-Message-State: AOJu0YwI96TnTetkSGdGirnHINesaj5BgEd9LAxHdPeqOWYqH560UcIw sIn6tynk4NsAK4cAv4D7/HNwtLiDuuSW3AxRrq+xnqPcLVr7x00saxxr/K2NfLc= X-Google-Smtp-Source: AGHT+IGLIoniWN9zhXX/4urfnI67oySg7LJ+wg+D1wIqvemqtwxSv5tkcdtwysLdf4WBXNf9QGA4OA== X-Received: by 2002:a17:907:7f27:b0:a7d:e84c:a9e7 with SMTP id a640c23a62f3a-a80ed2ca9a6mr235037966b.53.1723542101757; Tue, 13 Aug 2024 02:41:41 -0700 (PDT) Received: from localhost (p200300de37360a00e6b318fffe37a690.dip0.t-ipconnect.de. [2003:de:3736:a00:e6b3:18ff:fe37:a690]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a80f3f47b4asm54827166b.36.2024.08.13.02.41.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 02:41:41 -0700 (PDT) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: dm-devel@lists.linux.dev, Martin Wilck Subject: [PATCH 1/2] libmpathcmd: reinstate ABI 1.0.0 Date: Tue, 13 Aug 2024 11:40:45 +0200 Message-ID: <20240813094046.21644-1-mwilck@suse.com> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 __mpath_connect() was part of our public ABI. Instead of removing it completely, define it as a weak alias of the new mpath_connect__(). This way, programs linked against previous versions of libmpathcmd will continue to work. This shouldn't interfere with general symbol naming rules, as a weak symbol won't override a library symbol of the same name. Signed-off-by: Martin Wilck Tested-by: Benjamin Marzinski Reviewed-by: Benjamin Marzinski --- libmpathcmd/libmpathcmd.version | 12 ++++++++---- libmpathcmd/mpath_cmd.c | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libmpathcmd/libmpathcmd.version b/libmpathcmd/libmpathcmd.version index a786c25..81bdb2b 100644 --- a/libmpathcmd/libmpathcmd.version +++ b/libmpathcmd/libmpathcmd.version @@ -10,16 +10,20 @@ * * See libmultipath.version for general policy about version numbers. */ -LIBMPATHCMD_2.0.0 { + +LIBMPATHCMD_1.0.0 { global: mpath_connect; - mpath_connect__; + __mpath_connect; mpath_disconnect; mpath_process_cmd; mpath_recv_reply; mpath_recv_reply_len; mpath_recv_reply_data; mpath_send_cmd; -local: - *; }; + +LIBMPATHCMD_1.1.0 { +global: + mpath_connect__; +} LIBMPATHCMD_1.0.0; diff --git a/libmpathcmd/mpath_cmd.c b/libmpathcmd/mpath_cmd.c index 1fa036c..a38e8b6 100644 --- a/libmpathcmd/mpath_cmd.c +++ b/libmpathcmd/mpath_cmd.c @@ -133,6 +133,9 @@ int mpath_connect__(int nonblocking) return fd; } +extern int __mpath_connect(int) + __attribute__((weak, alias("mpath_connect__"))); + /* * connect to a unix domain socket */ From patchwork Tue Aug 13 09:40:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13761671 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EBB817F4F2 for ; Tue, 13 Aug 2024 09:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723542107; cv=none; b=oPRWsmup9wLghUFT7xBYuofgS0PjzVgoWbtuZ/quC1ISHWhl9/RlRZ6sbil67u8B5nZ8zAmi/gKjSe5C6HwPDpCwP3LcSyUxA+qLpojwKdFP+8OXZlGV7Uj+0Yh8NXBm5quSG6Y4klg/hg5Letr48FOfgn6GG79r5dW1ga03f0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723542107; c=relaxed/simple; bh=/gzGlUvORML+is9M3KbAn37aGUlG05wEhs98rAuUbwA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvEuJY4lEP2Sx5mB+kcTybk2I8WkvG+e4TD7vbcSN+tAbe5ePQAgSrijdAgSexeyLnhEHwB8TNO08unlUMKAcQWgw6SWO+RKZPy4tGpH6ZAMOt9ffIaXhh6sSf1YH5Z7QSX7OrfsNs/1IoysP7+dD8+bKnZOlfTWi6vSx9sbdKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=aAeGvr8t; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="aAeGvr8t" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5a1337cfbb5so6968421a12.3 for ; Tue, 13 Aug 2024 02:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723542103; x=1724146903; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jncRdj7NKphL0xOwvljwl0SQ+kZOAF6WY9y4OO+eay8=; b=aAeGvr8twhBs8OUPwGag4cMg63CNK8jO12JZPAIb/FtkBKpkoTMAmsboKI/TK/dl1C qxRbtygbQ6fnzekiyUgT/l9lV3eem5VqMgaQLf3bJ/ziJ6V3sflz4Mj/iuGJXg99wxz7 exB8PTjvE4ixAfD81zJZniEcZYhlOt/URxpAfkOnYl38qkGvsXPwbv4DPdA+qklccg4D yKjfcWgsHvkeesMihK7KldOUHn351h8mDpxtYkWMVMn3or7d0exFaCWA8IwtO2OSYoQ9 Ti2lV2MfKfWu/pfQ4OSbYz5D6sKz7cM/lIegcxIZX0W7/IQ0dvs/Y5Nv3AV+yug3IIPi 9W4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723542103; x=1724146903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jncRdj7NKphL0xOwvljwl0SQ+kZOAF6WY9y4OO+eay8=; b=LJVI9egmXm87t5tonoWAYboQOXXH6gdhA4SWqLEarACa3J/o3SzjVxb6SEA1c45nMR eFSMAPeKAHHghfBQU6u9Tno1iiNh7u6lpYAu5AhjLJpGnWk5UfLFQP2ve7v/MP77cdTX LN/xjs/jh1/X02stvmXTiy1jJ5dD7hNClFLIjZWunt6kmyp13WjuHUF85Z/tscqkl/jO YNuFru+hH9uPw9f9lE9K8L9Bcq1ZV4hLOF0xEqaL0IwPLILCXHX2iXmj2Zgvlm3FE6Z7 3WGIXhILu/XXF5EkeHG/t1QgA/1VDGAscdmmP54sDt7EMYgBP6yyGPjcf6pZKXkhvkYJ XMwA== X-Gm-Message-State: AOJu0YxodBN2QjhbQ6sNd5a9nxvieNfkqrX9oSEg8SXyVMr32VtMDX35 E6oqoQ41fgqSBGrwWtV/AkXndl3MpAxCQPMM0JdJy+q3D80UowhNStvW+ZjOhFg= X-Google-Smtp-Source: AGHT+IGLRRwFs1ebEZHSUsXHRHxjwRT2rq01Psfynrn9++kiloy8mmdKC2Hq6mT6Zi2c67BJhVt1yA== X-Received: by 2002:a17:907:c8a9:b0:a7a:9447:3e8b with SMTP id a640c23a62f3a-a80ed1c2388mr230959566b.25.1723542102916; Tue, 13 Aug 2024 02:41:42 -0700 (PDT) Received: from localhost (p200300de37360a00e6b318fffe37a690.dip0.t-ipconnect.de. [2003:de:3736:a00:e6b3:18ff:fe37:a690]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a80f3feab58sm54534566b.95.2024.08.13.02.41.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Aug 2024 02:41:42 -0700 (PDT) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: dm-devel@lists.linux.dev, Martin Wilck Subject: [PATCH 2/2] libmpathpersist: reinstate ABI 2.1.0 Date: Tue, 13 Aug 2024 11:40:46 +0200 Message-ID: <20240813094046.21644-2-mwilck@suse.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240813094046.21644-1-mwilck@suse.com> References: <20240813094046.21644-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 __mpath_persistent_reserve_{in,out}() were part of our public ABI. Instead of removing them completely, define it as a weak aliases. This way, programs linked against previous versions of libmpathpersist will continue to work. This shouldn't interfere with general symbol naming rules, as a weak symbol won't override a library symbol of the same name. Signed-off-by: Martin Wilck --- libmpathpersist/libmpathpersist.version | 17 ++++++++++++----- libmpathpersist/mpath_persist.c | 6 ++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libmpathpersist/libmpathpersist.version b/libmpathpersist/libmpathpersist.version index f467d99..c7ddafb 100644 --- a/libmpathpersist/libmpathpersist.version +++ b/libmpathpersist/libmpathpersist.version @@ -10,23 +10,30 @@ * * See libmultipath.version for general policy about version numbers. */ -LIBMPATHPERSIST_3.0.0 { +/* Previous API for backward compatibility */ +LIBMPATHPERSIST_2.1.0 { global: - /* public API as defined in mpath_persist.h */ libmpathpersist_exit; libmpathpersist_init; mpath_lib_exit; mpath_lib_init; mpath_mx_alloc_len; mpath_persistent_reserve_free_vecs; - mpath_persistent_reserve_in__; + __mpath_persistent_reserve_in; mpath_persistent_reserve_in; mpath_persistent_reserve_init_vecs; - mpath_persistent_reserve_out__; + __mpath_persistent_reserve_out; mpath_persistent_reserve_out; -local: *; +local: + *; }; +LIBMPATHPERSIST_2.2.0 { +global: + mpath_persistent_reserve_in__; + mpath_persistent_reserve_out__; +} LIBMPATHPERSIST_2.1.0; + __LIBMPATHPERSIST_INT_1.0.0 { /* Internal use by multipath-tools */ dumpHex; diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c index ace91d7..f5267eb 100644 --- a/libmpathpersist/mpath_persist.c +++ b/libmpathpersist/mpath_persist.c @@ -127,6 +127,8 @@ int mpath_persistent_reserve_in__(int fd, int rq_servact, resp, noisy); } +extern int __mpath_persistent_reserve_in(int, int, struct prin_resp *, int) + __attribute__((weak, alias("mpath_persistent_reserve_in__"))); int mpath_persistent_reserve_out__( int fd, int rq_servact, int rq_scope, unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy) @@ -136,6 +138,10 @@ int mpath_persistent_reserve_out__( int fd, int rq_servact, int rq_scope, noisy); } +extern int __mpath_persistent_reserve_out(int, int, int, unsigned int, + struct prout_param_descriptor *, int) + __attribute__((weak, alias("mpath_persistent_reserve_out__"))); + int mpath_persistent_reserve_in (int fd, int rq_servact, struct prin_resp *resp, int noisy, int verbose) {