From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org
Cc: philipp.reisner@linbit.com, gregkh@suse.de
Subject: [PATCH 11/12] DRBD: misc
Date: Mon, 23 Mar 2009 16:48:06 +0100 [thread overview]
Message-ID: <1237823287-12734-12-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1237823287-12734-11-git-send-email-philipp.reisner@linbit.com>
buildtag.c tag will go away when we are not longer an external module.
---
diff -uNrp linux-2.6.29-rc8/drivers/block/drbd/drbd_buildtag.c linux-2.6.29-rc8-drbd/drivers/block/drbd/drbd_buildtag.c
--- linux-2.6.29-rc8/drivers/block/drbd/drbd_buildtag.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.29-rc8-drbd/drivers/block/drbd/drbd_buildtag.c 2009-03-23 10:54:33.411143000 +0100
@@ -0,0 +1,7 @@
+/* automatically generated. DO NOT EDIT. */
+#include <linux/drbd_config.h>
+const char *drbd_buildtag(void)
+{
+ return "GIT-hash: 4af0e2574a0647b16810a7a82856691ca822a3a9"
+ " build by phil@fat-tyre, 2009-03-23 10:54:33";
+}
diff -uNrp linux-2.6.29-rc8/drivers/block/drbd/drbd_strings.c linux-2.6.29-rc8-drbd/drivers/block/drbd/drbd_strings.c
--- linux-2.6.29-rc8/drivers/block/drbd/drbd_strings.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.29-rc8-drbd/drivers/block/drbd/drbd_strings.c 2009-03-18 13:45:47.923235000 +0100
@@ -0,0 +1,116 @@
+/*
+ drbd.h
+ Kernel module for 2.6.x Kernels
+
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
+
+ Copyright (C) 2003-2008, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2008, Philipp Reisner <philipp.reisner@linbit.com>.
+ Copyright (C) 2003-2008, Lars Ellenberg <lars.ellenberg@linbit.com>.
+
+ drbd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ drbd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with drbd; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <linux/drbd.h>
+
+static const char *drbd_conn_s_names[] = {
+ [StandAlone] = "StandAlone",
+ [Disconnecting] = "Disconnecting",
+ [Unconnected] = "Unconnected",
+ [Timeout] = "Timeout",
+ [BrokenPipe] = "BrokenPipe",
+ [NetworkFailure] = "NetworkFailure",
+ [ProtocolError] = "ProtocolError",
+ [WFConnection] = "WFConnection",
+ [WFReportParams] = "WFReportParams",
+ [TearDown] = "TearDown",
+ [Connected] = "Connected",
+ [StartingSyncS] = "StartingSyncS",
+ [StartingSyncT] = "StartingSyncT",
+ [WFBitMapS] = "WFBitMapS",
+ [WFBitMapT] = "WFBitMapT",
+ [WFSyncUUID] = "WFSyncUUID",
+ [SyncSource] = "SyncSource",
+ [SyncTarget] = "SyncTarget",
+ [VerifyS] = "VerifyS",
+ [VerifyT] = "VerifyT",
+ [PausedSyncS] = "PausedSyncS",
+ [PausedSyncT] = "PausedSyncT"
+};
+
+static const char *drbd_role_s_names[] = {
+ [Primary] = "Primary",
+ [Secondary] = "Secondary",
+ [Unknown] = "Unknown"
+};
+
+static const char *drbd_disk_s_names[] = {
+ [Diskless] = "Diskless",
+ [Attaching] = "Attaching",
+ [Failed] = "Failed",
+ [Negotiating] = "Negotiating",
+ [Inconsistent] = "Inconsistent",
+ [Outdated] = "Outdated",
+ [DUnknown] = "DUnknown",
+ [Consistent] = "Consistent",
+ [UpToDate] = "UpToDate",
+};
+
+static const char *drbd_state_sw_errors[] = {
+ [-SS_TwoPrimaries] = "Multiple primaries not allowed by config",
+ [-SS_NoUpToDateDisk] =
+ "Refusing to be Primary without at least one UpToDate disk",
+ [-SS_BothInconsistent] = "Refusing to be inconsistent on both nodes",
+ [-SS_SyncingDiskless] = "Refusing to be syncing and diskless",
+ [-SS_ConnectedOutdates] = "Refusing to be Outdated while Connected",
+ [-SS_PrimaryNOP] = "Refusing to be Primary while peer is not outdated",
+ [-SS_ResyncRunning] = "Can not start OV/resync since it is already active",
+ [-SS_AlreadyStandAlone] = "Can not disconnect a StandAlone device",
+ [-SS_CW_FailedByPeer] = "State changed was refused by peer node",
+ [-SS_IsDiskLess] =
+ "Device is diskless, the requesed operation requires a disk",
+ [-SS_DeviceInUse] = "Device is held open by someone",
+ [-SS_NoNetConfig] = "Have no net/connection configuration",
+ [-SS_NoVerifyAlg] = "Need a verify algorithm to start online verify",
+ [-SS_NeedConnection] = "Need a connection to start verify or resync",
+ [-SS_NotSupported] = "Peer does not support protocol",
+ [-SS_LowerThanOutdated] = "Disk state is lower than outdated",
+ [-SS_InTransientState] = "In transient state, retry after next state change",
+ [-SS_ConcurrentStChg] = "Concurrent state changes detected and aborted",
+};
+
+const char *conns_to_name(enum drbd_conns s)
+{
+ /* enums are unsigned... */
+ return s > PausedSyncT ? "TOO_LARGE" : drbd_conn_s_names[s];
+}
+
+const char *roles_to_name(enum drbd_role s)
+{
+ return s > Secondary ? "TOO_LARGE" : drbd_role_s_names[s];
+}
+
+const char *disks_to_name(enum drbd_disk_state s)
+{
+ return s > UpToDate ? "TOO_LARGE" : drbd_disk_s_names[s];
+}
+
+const char *set_st_err_name(enum set_st_err err)
+{
+ return err <= SS_AfterLastError ? "TOO_SMALL" :
+ err > SS_TwoPrimaries ? "TOO_LARGE"
+ : drbd_state_sw_errors[-err];
+}
next prev parent reply other threads:[~2009-03-23 16:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 15:47 [PATCH 00/12] DRBD: a block device for HA clusters Philipp Reisner
2009-03-23 15:47 ` [PATCH 01/12] DRBD: lru_cache Philipp Reisner
2009-03-23 15:47 ` [PATCH 02/12] DRBD: activity_log Philipp Reisner
2009-03-23 15:47 ` [PATCH 03/12] DRBD: bitmap Philipp Reisner
2009-03-23 15:47 ` [PATCH 04/12] DRBD: request Philipp Reisner
2009-03-23 15:48 ` [PATCH 05/12] DRBD: userspace_interface Philipp Reisner
2009-03-23 15:48 ` [PATCH 06/12] DRBD: internal_data_structures Philipp Reisner
2009-03-23 15:48 ` [PATCH 07/12] DRBD: main Philipp Reisner
2009-03-23 15:48 ` [PATCH 08/12] DRBD: receiver Philipp Reisner
2009-03-23 15:48 ` [PATCH 09/12] DRBD: proc Philipp Reisner
2009-03-23 15:48 ` [PATCH 10/12] DRBD: worker Philipp Reisner
2009-03-23 15:48 ` Philipp Reisner [this message]
2009-03-23 15:48 ` [PATCH 12/12] DRBD: final Philipp Reisner
2009-04-08 10:17 ` [PATCH 08/12] DRBD: receiver Nikanth K
2009-04-08 15:10 ` Philipp Reisner
2009-03-23 16:51 ` [PATCH 07/12] DRBD: main Alexey Dobriyan
2009-03-23 22:26 ` Philipp Reisner
2009-04-08 10:16 ` [PATCH 04/12] DRBD: request Nikanth K
2009-04-08 10:16 ` [PATCH 03/12] DRBD: bitmap Nikanth K
2009-04-08 15:09 ` Philipp Reisner
2009-03-24 12:27 ` [PATCH 02/12] DRBD: activity_log Andi Kleen
2009-03-25 10:27 ` Philipp Reisner
2009-03-25 10:46 ` Andi Kleen
2009-03-25 10:57 ` Philipp Reisner
2009-03-23 15:58 ` [PATCH 01/12] DRBD: lru_cache Greg KH
2009-04-08 10:15 ` Nikanth K
2009-04-08 15:09 ` Philipp Reisner
2009-03-30 16:47 [PATCH 00/12] DRBD: a block device for HA clusters Philipp Reisner
2009-03-30 16:47 ` [PATCH 01/13] DRBD: lru_cache Philipp Reisner
2009-03-30 16:47 ` [PATCH 02/13] DRBD: activity_log Philipp Reisner
2009-03-30 16:47 ` [PATCH 03/13] DRBD: bitmap Philipp Reisner
2009-03-30 16:47 ` [PATCH 04/13] DRBD: request Philipp Reisner
2009-03-30 16:47 ` [PATCH 05/13] DRBD: userspace_interface Philipp Reisner
2009-03-30 16:47 ` [PATCH 06/13] DRBD: internal_data_structures Philipp Reisner
2009-03-30 16:47 ` [PATCH 07/13] DRBD: main Philipp Reisner
2009-03-30 16:47 ` [PATCH 08/13] DRBD: receiver Philipp Reisner
2009-03-30 16:47 ` [PATCH 09/13] DRBD: proc Philipp Reisner
2009-03-30 16:47 ` [PATCH 10/13] DRBD: worker Philipp Reisner
2009-03-30 16:47 ` [PATCH 11/12] DRBD: misc Philipp Reisner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237823287-12734-12-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).