From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <jens.axboe@oracle.com>, Greg KH <gregkh@suse.de>,
Neil Brown <neilb@suse.de>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Sam Ravnborg <sam@ravnborg.org>, Dave Jones <davej@redhat.com>,
Nikanth Karthikesan <knikanth@suse.de>,
"Lars Marowsky-Bree" <lmb@suse.de>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>,
Kyle Moffett <kyle@moffetthome.net>,
Bart Van Assche <bart.vanassche@gmail.com>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
Philipp Reisner <philipp.reisner@linbit.com>
Subject: [PATCH 13/16] DRBD: misc
Date: Thu, 30 Apr 2009 13:26:49 +0200 [thread overview]
Message-ID: <1241090812-13516-14-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1241090812-13516-13-git-send-email-philipp.reisner@linbit.com>
buildtag.c tag will go away when we are not longer an external module.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
diff --git a/drivers/block/drbd/drbd_buildtag.c b/drivers/block/drbd/drbd_buildtag.c
new file mode 100644
index 0000000..a58ad76
--- /dev/null
+++ b/drivers/block/drbd/drbd_buildtag.c
@@ -0,0 +1,7 @@
+/* automatically generated. DO NOT EDIT. */
+#include <linux/drbd_config.h>
+const char *drbd_buildtag(void)
+{
+ return "GIT-hash: 29ef4c01e46b0a269d7bec39d5178be06097fead drbd/Kconfig drbd/Makefile drbd/Makefile-2.6 drbd/drbd_actlog.c drbd/drbd_bitmap.c drbd/drbd_int.h drbd/drbd_main.c drbd/drbd_nl.c drbd/drbd_proc.c drbd/drbd_receiver.c drbd/drbd_req.c drbd/drbd_req.h drbd/drbd_tracing.c drbd/drbd_tracing.h drbd/drbd_worker.c drbd/drbd_wrappers.h drbd/linux/drbd_config.h"
+ " build by phil@fat-tyre, 2009-04-29 15:43:41";
+}
diff --git a/drivers/block/drbd/drbd_strings.c b/drivers/block/drbd/drbd_strings.c
new file mode 100644
index 0000000..b230693
--- /dev/null
+++ b/drivers/block/drbd/drbd_strings.c
@@ -0,0 +1,113 @@
+/*
+ drbd.h
+
+ 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[] = {
+ [C_STANDALONE] = "StandAlone",
+ [C_DISCONNECTING] = "Disconnecting",
+ [C_UNCONNECTED] = "Unconnected",
+ [C_TIMEOUT] = "Timeout",
+ [C_BROKEN_PIPE] = "BrokenPipe",
+ [C_NETWORK_FAILURE] = "NetworkFailure",
+ [C_PROTOCOL_ERROR] = "ProtocolError",
+ [C_WF_CONNECTION] = "WFConnection",
+ [C_WF_REPORT_PARAMS] = "WFReportParams",
+ [C_TEAR_DOWN] = "TearDown",
+ [C_CONNECTED] = "Connected",
+ [C_STARTING_SYNC_S] = "StartingSyncS",
+ [C_STARTING_SYNC_T] = "StartingSyncT",
+ [C_WF_BITMAP_S] = "WFBitMapS",
+ [C_WF_BITMAP_T] = "WFBitMapT",
+ [C_WF_SYNC_UUID] = "WFSyncUUID",
+ [C_SYNC_SOURCE] = "SyncSource",
+ [C_SYNC_TARGET] = "SyncTarget",
+ [C_PAUSED_SYNC_S] = "PausedSyncS",
+ [C_PAUSED_SYNC_T] = "PausedSyncT",
+ [C_VERIFY_S] = "VerifyS",
+ [C_VERIFY_T] = "VerifyT",
+};
+
+static const char *drbd_role_s_names[] = {
+ [R_PRIMARY] = "Primary",
+ [R_SECONDARY] = "Secondary",
+ [R_UNKNOWN] = "Unknown"
+};
+
+static const char *drbd_disk_s_names[] = {
+ [D_DISKLESS] = "Diskless",
+ [D_ATTACHING] = "Attaching",
+ [D_FAILED] = "Failed",
+ [D_NEGOTIATING] = "Negotiating",
+ [D_INCONSISTENT] = "Inconsistent",
+ [D_OUTDATED] = "Outdated",
+ [D_UNKNOWN] = "DUnknown",
+ [D_CONSISTENT] = "Consistent",
+ [D_UP_TO_DATE] = "UpToDate",
+};
+
+static const char *drbd_state_sw_errors[] = {
+ [-SS_TWO_PRIMARIES] = "Multiple primaries not allowed by config",
+ [-SS_NO_UP_TO_DATE_DISK] = "Refusing to be Primary without at least one UpToDate disk",
+ [-SS_BOTH_INCONSISTENT] = "Refusing to be inconsistent on both nodes",
+ [-SS_SYNCING_DISKLESS] = "Refusing to be syncing and diskless",
+ [-SS_CONNECTED_OUTDATES] = "Refusing to be Outdated while Connected",
+ [-SS_PRIMARY_NOP] = "Refusing to be Primary while peer is not outdated",
+ [-SS_RESYNC_RUNNING] = "Can not start OV/resync since it is already active",
+ [-SS_ALREADY_STANDALONE] = "Can not disconnect a StandAlone device",
+ [-SS_CW_FAILED_BY_PEER] = "State changed was refused by peer node",
+ [-SS_IS_DISKLESS] = "Device is diskless, the requesed operation requires a disk",
+ [-SS_DEVICE_IN_USE] = "Device is held open by someone",
+ [-SS_NO_NET_CONFIG] = "Have no net/connection configuration",
+ [-SS_NO_VERIFY_ALG] = "Need a verify algorithm to start online verify",
+ [-SS_NEED_CONNECTION] = "Need a connection to start verify or resync",
+ [-SS_NOT_SUPPORTED] = "Peer does not support protocol",
+ [-SS_LOWER_THAN_OUTDATED] = "Disk state is lower than outdated",
+ [-SS_IN_TRANSIENT_STATE] = "In transient state, retry after next state change",
+ [-SS_CONCURRENT_ST_CHG] = "Concurrent state changes detected and aborted",
+};
+
+const char *conns_to_name(enum drbd_conns s)
+{
+ /* enums are unsigned... */
+ return s > C_PAUSED_SYNC_T ? "TOO_LARGE" : drbd_conn_s_names[s];
+}
+
+const char *roles_to_name(enum drbd_role s)
+{
+ return s > R_SECONDARY ? "TOO_LARGE" : drbd_role_s_names[s];
+}
+
+const char *disks_to_name(enum drbd_disk_state s)
+{
+ return s > D_UP_TO_DATE ? "TOO_LARGE" : drbd_disk_s_names[s];
+}
+
+const char *set_st_err_name(enum drbd_state_ret_codes err)
+{
+ return err <= SS_AFTER_LAST_ERROR ? "TOO_SMALL" :
+ err > SS_TWO_PRIMARIES ? "TOO_LARGE"
+ : drbd_state_sw_errors[-err];
+}
next prev parent reply other threads:[~2009-04-30 11:32 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 11:26 [PATCH 00/16] DRBD: a block device for HA clusters Philipp Reisner
2009-04-30 11:26 ` [PATCH 01/16] DRBD: major.h Philipp Reisner
2009-04-30 11:26 ` [PATCH 02/16] DRBD: lru_cache Philipp Reisner
2009-04-30 11:26 ` [PATCH 03/16] DRBD: activity_log Philipp Reisner
2009-04-30 11:26 ` [PATCH 04/16] DRBD: bitmap Philipp Reisner
2009-04-30 11:26 ` [PATCH 05/16] DRBD: request Philipp Reisner
2009-04-30 11:26 ` [PATCH 06/16] DRBD: userspace_interface Philipp Reisner
2009-04-30 11:26 ` [PATCH 07/16] DRBD: internal_data_structures Philipp Reisner
2009-04-30 11:26 ` [PATCH 08/16] DRBD: main Philipp Reisner
2009-04-30 11:26 ` [PATCH 09/16] DRBD: receiver Philipp Reisner
2009-04-30 11:26 ` [PATCH 10/16] DRBD: proc Philipp Reisner
2009-04-30 11:26 ` [PATCH 11/16] DRBD: worker Philipp Reisner
2009-04-30 11:26 ` [PATCH 12/16] DRBD: variable_length_integer_encoding Philipp Reisner
2009-04-30 11:26 ` Philipp Reisner [this message]
2009-04-30 11:26 ` [PATCH 14/16] DRBD: tracepoint_probes Philipp Reisner
2009-04-30 11:26 ` [PATCH 15/16] DRBD: documentation Philipp Reisner
2009-04-30 11:26 ` [PATCH 16/16] DRBD: final Philipp Reisner
2009-05-02 15:45 ` [PATCH 12/16] DRBD: variable_length_integer_encoding James Bottomley
2009-05-02 17:29 ` Lars Ellenberg
2009-05-02 15:44 ` [PATCH 10/16] DRBD: proc James Bottomley
2009-05-02 20:23 ` Lars Ellenberg
2009-05-02 15:41 ` [PATCH 04/16] DRBD: bitmap James Bottomley
2009-05-02 17:28 ` Lars Ellenberg
2009-05-03 5:21 ` Neil Brown
2009-05-03 7:38 ` Lars Ellenberg
2009-05-05 17:48 ` Lars Marowsky-Bree
2009-05-05 17:51 ` James Bottomley
2009-05-05 22:26 ` Neil Brown
2009-05-01 9:01 ` [PATCH 03/16] DRBD: activity_log Andrew Morton
2009-05-02 17:00 ` Lars Ellenberg
2009-05-01 8:59 ` [PATCH 02/16] DRBD: lru_cache Andrew Morton
2009-05-02 15:26 ` Lars Ellenberg
2009-05-02 17:58 ` Andrew Morton
2009-05-02 18:13 ` Lars Ellenberg
2009-05-02 18:26 ` Andrew Morton
2009-05-02 19:39 ` Lars Ellenberg
2009-05-02 23:51 ` Kyle Moffett
2009-05-03 6:27 ` Lars Ellenberg
2009-05-03 14:06 ` Kyle Moffett
2009-05-03 22:48 ` Lars Ellenberg
2009-05-04 0:48 ` Kyle Moffett
2009-05-04 1:01 ` Kyle Moffett
2009-05-04 16:12 ` Rik van Riel
2009-05-04 16:15 ` Lars Ellenberg
2009-05-01 8:59 ` [PATCH 01/16] DRBD: major.h Andrew Morton
2009-05-01 8:59 ` [PATCH 00/16] DRBD: a block device for HA clusters Andrew Morton
2009-05-01 11:15 ` Lars Marowsky-Bree
2009-05-01 13:14 ` Dave Jones
2009-05-01 19:14 ` Andrew Morton
2009-05-05 4:05 ` Christian Kujau
2009-05-02 7:33 ` Bart Van Assche
2009-05-03 5:36 ` Willy Tarreau
2009-05-03 5:40 ` david
2009-05-03 14:21 ` James Bottomley
2009-05-03 14:36 ` david
2009-05-03 14:45 ` James Bottomley
2009-05-03 14:56 ` david
2009-05-03 15:09 ` James Bottomley
2009-05-03 15:22 ` david
2009-05-03 15:38 ` James Bottomley
2009-05-03 15:48 ` david
2009-05-03 16:02 ` James Bottomley
2009-05-03 16:13 ` david
2009-05-04 8:28 ` Philipp Reisner
2009-05-04 17:24 ` James Bottomley
2009-05-05 8:21 ` Philipp Reisner
2009-05-05 14:09 ` James Bottomley
2009-05-05 15:56 ` Philipp Reisner
2009-05-05 17:05 ` James Bottomley
2009-05-05 21:45 ` Philipp Reisner
2009-05-05 21:53 ` James Bottomley
2009-05-06 8:17 ` Philipp Reisner
2009-05-05 15:03 ` Bart Van Assche
2009-05-05 15:57 ` Philipp Reisner
2009-05-05 17:38 ` Lars Marowsky-Bree
2009-05-03 10:06 ` Philipp Reisner
2009-05-03 10:15 ` Thomas Backlund
2009-05-03 5:53 ` Neil Brown
2009-05-03 6:24 ` david
2009-05-03 8:29 ` Lars Ellenberg
2009-05-03 11:00 ` Neil Brown
2009-05-03 21:32 ` Lars Ellenberg
2009-05-04 16:12 ` Lars Marowsky-Bree
2009-05-05 22:08 ` Lars Ellenberg
2009-05-15 12:10 Philipp Reisner
2009-05-15 12:10 ` [PATCH 01/16] DRBD: major.h Philipp Reisner
2009-05-15 12:10 ` [PATCH 02/16] DRBD: lru_cache Philipp Reisner
2009-05-15 12:10 ` [PATCH 03/16] DRBD: activity_log Philipp Reisner
2009-05-15 12:10 ` [PATCH 04/16] DRBD: bitmap Philipp Reisner
2009-05-15 12:10 ` [PATCH 05/16] DRBD: request Philipp Reisner
2009-05-15 12:10 ` [PATCH 06/16] DRBD: userspace_interface Philipp Reisner
2009-05-15 12:10 ` [PATCH 07/16] DRBD: internal_data_structures Philipp Reisner
2009-05-15 12:10 ` [PATCH 08/16] DRBD: main Philipp Reisner
2009-05-15 12:10 ` [PATCH 09/16] DRBD: receiver Philipp Reisner
2009-05-15 12:10 ` [PATCH 10/16] DRBD: proc Philipp Reisner
2009-05-15 12:10 ` [PATCH 11/16] DRBD: worker Philipp Reisner
2009-05-15 12:10 ` [PATCH 12/16] DRBD: variable_length_integer_encoding Philipp Reisner
2009-05-15 12:10 ` [PATCH 13/16] DRBD: misc Philipp Reisner
2009-05-15 12:18 ` Lars Marowsky-Bree
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=1241090812-13516-14-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bart.vanassche@gmail.com \
--cc=davej@redhat.com \
--cc=gregkh@suse.de \
--cc=jens.axboe@oracle.com \
--cc=knikanth@suse.de \
--cc=kyle@moffetthome.net \
--cc=lars.ellenberg@linbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lmb@suse.de \
--cc=nab@linux-iscsi.org \
--cc=neilb@suse.de \
--cc=sam@ravnborg.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).