From patchwork Fri Dec 9 14:55:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_B=C3=B6hmwalder?= X-Patchwork-Id: 13069682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 560CBC04FDE for ; Fri, 9 Dec 2022 14:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbiLIO4I (ORCPT ); Fri, 9 Dec 2022 09:56:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230072AbiLIOzr (ORCPT ); Fri, 9 Dec 2022 09:55:47 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFCBC80A32 for ; Fri, 9 Dec 2022 06:55:08 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id f7so3396727edc.6 for ; Fri, 09 Dec 2022 06:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; 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=w8mQ1DNdko28cUxvjVBwoXrO008ZDGIG0DMI/J1nWT4=; b=IUG8ldHfU+Z2W8ssHSjmCqhbct2jByJci7FEf/55pMFshhMS7k+iLD4zTUZM/vN8Vq TRnxOna/m/DOf9FkM5W0nfGKVh437qsWJLBuTc1L9bEkkydiEQacgT3gsZcjlU0QvrUW ghoZGKHys0XNatcxeqS4WGCrc+i44BYjUktBdRGNt5HDu0QUK2jzN5dxUu9Pae4kYw7h BowqGf+a/9DnKfnfzwmGO2yrWIzTzyjRegbyqqcoPtXBIoLHqO/5TnYN+Tq+dbTaDC69 nCbN+jY+30BuRxWcHwRaAY0XSsCekS76GhnIPJBGTsy2XQy3ak0QU/x27zXWOJnP7sHb jgNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=w8mQ1DNdko28cUxvjVBwoXrO008ZDGIG0DMI/J1nWT4=; b=NILFUmCRcFP/p3eFkbPkJlR0eyY9kRWB0L05p2ijruj/x5Q5PsFTGP0rJLpUH6SXJo yYHcsm9PDPlgfkNbgkwplXBwA1EWGe4E2+793FkixlI7CANREA/6XjRx7FjV7mKVlGBe VRd35/Y1UMXTD/frdAJ3PB+ClKeVSUTWdIgMzW2yHK1Mt49K5w7yFcxfitMqdaEH/Th0 MhN/WWnvyuFcXOP+S1R+yMLv3+O9a2vqgTEh8W6+14KjykPOn5Ou+0jQiEcVKqo9bUKa 0AiPukoIyBU2uYuD2+C5xyPOgYv5fwvzywFWXKnFK07EXdKfBcF82WSMzKRIMYKmGEcz AnpA== X-Gm-Message-State: ANoB5pk4mCQiorRwcPZgiq8WVhGEQM6B4HGcY7Bc3rykvCcB5lEOEqwo 2Eq9PdUedeZKGWaTievMEzSfcQ== X-Google-Smtp-Source: AA0mqf61kq4qDITMmU/ANSy6fHJpUxypHKu0yrnlzXRMvNtX2P9Ui4uunU9KRDO1fLXg3COosGHBRQ== X-Received: by 2002:a05:6402:500f:b0:461:bce0:c783 with SMTP id p15-20020a056402500f00b00461bce0c783mr7206023eda.36.1670597707421; Fri, 09 Dec 2022 06:55:07 -0800 (PST) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id l4-20020aa7c304000000b0046b1d63cfc1sm716856edq.88.2022.12.09.06.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 06:55:07 -0800 (PST) From: =?utf-8?q?Christoph_B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?utf-8?q?Christoph_B=C3=B6hmwalder?= , Joel Colledge Subject: [PATCH 1/3] drbd: split off drbd_buildtag into separate file Date: Fri, 9 Dec 2022 15:55:02 +0100 Message-Id: <20221209145504.2273072-2-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> References: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org To be more similar to what we do in the out-of-tree module and ease the upstreaming process. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge --- drivers/block/drbd/Makefile | 2 +- drivers/block/drbd/drbd_buildtag.c | 22 ++++++++++++++++++++++ drivers/block/drbd/drbd_main.c | 18 ------------------ 3 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 drivers/block/drbd/drbd_buildtag.c diff --git a/drivers/block/drbd/Makefile b/drivers/block/drbd/Makefile index c93e462130ff..67a8b352a1d5 100644 --- a/drivers/block/drbd/Makefile +++ b/drivers/block/drbd/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -drbd-y := drbd_bitmap.o drbd_proc.o +drbd-y := drbd_buildtag.o drbd_bitmap.o drbd_proc.o drbd-y += drbd_worker.o drbd_receiver.o drbd_req.o drbd_actlog.o drbd-y += drbd_main.o drbd_strings.o drbd_nl.o drbd-y += drbd_interval.o drbd_state.o diff --git a/drivers/block/drbd/drbd_buildtag.c b/drivers/block/drbd/drbd_buildtag.c new file mode 100644 index 000000000000..956a4d5c339b --- /dev/null +++ b/drivers/block/drbd/drbd_buildtag.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include +#include + +const char *drbd_buildtag(void) +{ + /* DRBD built from external sources has here a reference to the + * git hash of the source code. + */ + + static char buildtag[38] = "\0uilt-in"; + + if (buildtag[0] == 0) { +#ifdef MODULE + sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion); +#else + buildtag[0] = 'b'; +#endif + } + + return buildtag; +} diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 7213ffd69a16..345bfac441da 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -3776,24 +3776,6 @@ _drbd_insert_fault(struct drbd_device *device, unsigned int type) } #endif -const char *drbd_buildtag(void) -{ - /* DRBD built from external sources has here a reference to the - git hash of the source code. */ - - static char buildtag[38] = "\0uilt-in"; - - if (buildtag[0] == 0) { -#ifdef MODULE - sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion); -#else - buildtag[0] = 'b'; -#endif - } - - return buildtag; -} - module_init(drbd_init) module_exit(drbd_cleanup) From patchwork Fri Dec 9 14:55:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_B=C3=B6hmwalder?= X-Patchwork-Id: 13069683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 970EAC4708D for ; Fri, 9 Dec 2022 14:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbiLIO4J (ORCPT ); Fri, 9 Dec 2022 09:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbiLIOzr (ORCPT ); Fri, 9 Dec 2022 09:55:47 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E9680A3A for ; Fri, 9 Dec 2022 06:55:09 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id s5so3377839edc.12 for ; Fri, 09 Dec 2022 06:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; 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=rnWGghdREJ6zIaEe7+G9hDEkG3lKlZcJtoyqEzGOui4=; b=etk+O6PxUdlMnrbUHpn6B7DyLtaQUUWYF68CRq/diHpQhMD1Z8IH20wHDuGOJ7Ps2J vC2i9BWWlwz5l+GrDZNBxw+W1qTuXLQlNfCd7StHomMxa3+hnOJ4iXULEZ1yXuUtLIi7 pZeG2tOWgfCC8jIEQTqshRzeWx3C8PCoXdDZqbRIUx/JuNKnTzg8qDamfb4MhonIB03y uYbkQ2tX8LWjTCRPZpY+AVF1BobG/QCvsVsuV9T2/ra06cxeIpJSHKw0TfYf/Dlkruo+ 8BZwazFbW6b0ntHMmBhjuTA7FwAsGpCBqGzaDNkL890QWEVq298eQneGC4gS/ev6ADSw 4Tvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rnWGghdREJ6zIaEe7+G9hDEkG3lKlZcJtoyqEzGOui4=; b=a+Whw3WXsGppPshOsU50cCYk0dirday4u8iN0JVmVWqBHX6dDR0psQCmUFNw+R+XZp dp7L6uCtT3b3j2ygoE1XL7lTuIbYQ5zTpQ1SUbtoF/ebHbuhrXh+kMvgKH7Shw00/miR +bEDiwtBkeZKWgF2yaQKH90OFDi42oQit5EkRPKIZYfAbOAiePzdUnKN+qFbQSjHB9io EJwvbTBVyvsEJlHsYb6Inaxq19O5SPDNkHjQEaL0vlpg0RbnI/9SwsllE2jL+weUejG6 MGAMh/SM0aQeoMx3uZ+JxxiHr/cHD0ZTHio5wBZv87NArn0D4odaJv/lQaIybQuYi/qB EyWw== X-Gm-Message-State: ANoB5pk8nJD+yLOtLnD3rEl4m8f9KBaxfJ9lxPg4KUGNLe7HZr2XJuLz xkppUCcE/jeaiTSgq6RefSOkZw== X-Google-Smtp-Source: AA0mqf5rbXukl5UTZkcY7tYtNfsG6ZjU+A51fdmuMQAEXwiG59ugk79RVU8Yl/8afabZ/aFwOYxQZw== X-Received: by 2002:a05:6402:298d:b0:465:f6a9:cb7b with SMTP id eq13-20020a056402298d00b00465f6a9cb7bmr4954559edb.12.1670597708142; Fri, 09 Dec 2022 06:55:08 -0800 (PST) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id l4-20020aa7c304000000b0046b1d63cfc1sm716856edq.88.2022.12.09.06.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 06:55:07 -0800 (PST) From: =?utf-8?q?Christoph_B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?utf-8?q?Christoph_B=C3=B6hmwalder?= , Joel Colledge Subject: [PATCH 2/3] drbd: drop API_VERSION define Date: Fri, 9 Dec 2022 15:55:03 +0100 Message-Id: <20221209145504.2273072-3-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> References: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Use the genetlink api version as defined in drbd_genl_api.h. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge --- drivers/block/drbd/drbd_debugfs.c | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_proc.c | 2 +- include/linux/drbd.h | 1 - include/linux/drbd_genl_api.h | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c index a72c096aa5b1..12460b584bcb 100644 --- a/drivers/block/drbd/drbd_debugfs.c +++ b/drivers/block/drbd/drbd_debugfs.c @@ -844,7 +844,7 @@ static int drbd_version_show(struct seq_file *m, void *ignored) { seq_printf(m, "# %s\n", drbd_buildtag()); seq_printf(m, "VERSION=%s\n", REL_VERSION); - seq_printf(m, "API_VERSION=%u\n", API_VERSION); + seq_printf(m, "API_VERSION=%u\n", GENL_MAGIC_VERSION); seq_printf(m, "PRO_VERSION_MIN=%u\n", PRO_VERSION_MIN); seq_printf(m, "PRO_VERSION_MAX=%u\n", PRO_VERSION_MAX); return 0; diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 345bfac441da..5156d2fb2d76 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2899,7 +2899,7 @@ static int __init drbd_init(void) pr_info("initialized. " "Version: " REL_VERSION " (api:%d/proto:%d-%d)\n", - API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX); + GENL_MAGIC_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX); pr_info("%s\n", drbd_buildtag()); pr_info("registered as block device major %d\n", DRBD_MAJOR); return 0; /* Success! */ diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c index 2227fb0db1ce..1d0feafceadc 100644 --- a/drivers/block/drbd/drbd_proc.c +++ b/drivers/block/drbd/drbd_proc.c @@ -228,7 +228,7 @@ int drbd_seq_show(struct seq_file *seq, void *v) }; seq_printf(seq, "version: " REL_VERSION " (api:%d/proto:%d-%d)\n%s\n", - API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX, drbd_buildtag()); + GENL_MAGIC_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX, drbd_buildtag()); /* cs .. connection state diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 5755537b51b1..df65a8f5228a 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -40,7 +40,6 @@ extern const char *drbd_buildtag(void); #define REL_VERSION "8.4.11" -#define API_VERSION 1 #define PRO_VERSION_MIN 86 #define PRO_VERSION_MAX 101 diff --git a/include/linux/drbd_genl_api.h b/include/linux/drbd_genl_api.h index bd62efc29002..70682c058027 100644 --- a/include/linux/drbd_genl_api.h +++ b/include/linux/drbd_genl_api.h @@ -47,7 +47,7 @@ enum drbd_state_info_bcast_reason { #undef linux #include -#define GENL_MAGIC_VERSION API_VERSION +#define GENL_MAGIC_VERSION 1 #define GENL_MAGIC_FAMILY drbd #define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr) #define GENL_MAGIC_INCLUDE_FILE From patchwork Fri Dec 9 14:55:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_B=C3=B6hmwalder?= X-Patchwork-Id: 13069684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55C18C4167B for ; Fri, 9 Dec 2022 14:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbiLIO4J (ORCPT ); Fri, 9 Dec 2022 09:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbiLIOzs (ORCPT ); Fri, 9 Dec 2022 09:55:48 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51BF981381 for ; Fri, 9 Dec 2022 06:55:10 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id v8so3423375edi.3 for ; Fri, 09 Dec 2022 06:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; 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=Nr0DjBH1YEnasxrYesj7cvRVZfRH4rPEDs0TxXAHiSg=; b=6BR4ftmEi4cwaY0Zq2EMADfCq7D3R7dRhGj565BcwcOdftO7DpLqU7m1Uq+/yJ+AGZ jh/kM4TgyggxJ+OTIBjhyKG6SAj9vKbh98eNvUeU43HoQPObiR6Pz9b5QNHJ3vavH2k1 ZtqdFgFQq6/oMk76hY+leei80rWiI5ExUI3F5vd83sJCp4F/ZTicV1hH7KE6ocr2Kxbc vIl+6NtxjPHuGXJE2mutZpRE0s5Mz54VT5WHCKvnLwDfs5udM6eQpLVXxJ2N+nbLSW9f wqeE2ymttBeIpxn5/ahdOSnUceCLnfxZJcAzEMCvBIYv079KyzKGFg/I7JNLpD/SZZ9L d6Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Nr0DjBH1YEnasxrYesj7cvRVZfRH4rPEDs0TxXAHiSg=; b=Dx8icUFu2fbExxlRCETf8Y0gj1xyGaVDiIUX/w1f6qRXoRQoNEQ6OXqRhjdpSM6/uI tbKiy/LZ8bZU03lYz5a0k8n8QDcUfG0G3UZpVA/odFi768yWH8qA68SSKPxljINhPT4y j9FyMae0WFIKDu07hGu+XIYXBuSuRQcIufZpd9MgySV5VWUpDwLTOQpHzCc4lTWl2Fxt ULqHv04ol8cCkS99IW/ZrHTDqhXrmU7hOTN2SlJmV/5jyREpbBBpqP06zkueYytwAjQ9 g+8VSAhUVDf5mVAqlcpD/8XY8r3xqvumq18CaFJ/LF6N7oxN0PImNxwsP7BpPFbzxJ6z BXZA== X-Gm-Message-State: ANoB5plZqxXk149TgGl7IAnhqgNGpw6xeJKsJUiBkCdF+62rkmjt+oOR LmNh6AxjnrKJvZV2l5VxsA3JfA== X-Google-Smtp-Source: AA0mqf4Yb/BOvMLtH6r67H46I1phEPMg/pmN85YtjlgWU29uNdJPkmrZ6mICq1Tm5TiV5cKxNxgBlA== X-Received: by 2002:a05:6402:1004:b0:46b:c156:9965 with SMTP id c4-20020a056402100400b0046bc1569965mr5266982edu.38.1670597708861; Fri, 09 Dec 2022 06:55:08 -0800 (PST) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id l4-20020aa7c304000000b0046b1d63cfc1sm716856edq.88.2022.12.09.06.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 06:55:08 -0800 (PST) From: =?utf-8?q?Christoph_B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?utf-8?q?Christoph_B=C3=B6hmwalder?= , Joel Colledge Subject: [PATCH 3/3] drbd: split off drbd_config into separate file Date: Fri, 9 Dec 2022 15:55:04 +0100 Message-Id: <20221209145504.2273072-4-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> References: <20221209145504.2273072-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org To be more similar to what we do in the out-of-tree module and ease the upstreaming process. Signed-off-by: Christoph Böhmwalder Reviewed-by: Joel Colledge --- drivers/block/drbd/drbd_buildtag.c | 2 +- drivers/block/drbd/drbd_int.h | 1 + include/linux/drbd.h | 6 ------ include/linux/drbd_config.h | 16 ++++++++++++++++ 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 include/linux/drbd_config.h diff --git a/drivers/block/drbd/drbd_buildtag.c b/drivers/block/drbd/drbd_buildtag.c index 956a4d5c339b..cb1aa66d7d5d 100644 --- a/drivers/block/drbd/drbd_buildtag.c +++ b/drivers/block/drbd/drbd_buildtag.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -#include +#include #include const char *drbd_buildtag(void) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index edce1f7ac2da..d89b7d03d4c8 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -34,6 +34,7 @@ #include #include #include +#include #include "drbd_strings.h" #include "drbd_state.h" #include "drbd_protocol.h" diff --git a/include/linux/drbd.h b/include/linux/drbd.h index df65a8f5228a..5468a2399d48 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h @@ -38,12 +38,6 @@ #endif -extern const char *drbd_buildtag(void); -#define REL_VERSION "8.4.11" -#define PRO_VERSION_MIN 86 -#define PRO_VERSION_MAX 101 - - enum drbd_io_error_p { EP_PASS_ON, /* FIXME should the better be named "Ignore"? */ EP_CALL_HELPER, diff --git a/include/linux/drbd_config.h b/include/linux/drbd_config.h new file mode 100644 index 000000000000..d215365c6bb1 --- /dev/null +++ b/include/linux/drbd_config.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * drbd_config.h + * DRBD's compile time configuration. + */ + +#ifndef DRBD_CONFIG_H +#define DRBD_CONFIG_H + +extern const char *drbd_buildtag(void); + +#define REL_VERSION "8.4.11" +#define PRO_VERSION_MIN 86 +#define PRO_VERSION_MAX 101 + +#endif