Commit 67ebb6d6 authored by Philipp Reisner's avatar Philipp Reisner

Cleanups in drbd.h, and drbd-connection-state-overview.dot

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 40d2a397
// vim: set sw=2 sts=2 :
digraph {
rankdir=BT
bgcolor=white
node [shape=plaintext]
node [fontcolor=black]
StandAlone [ style=filled,fillcolor=gray,label=StandAlone ]
node [fontcolor=lightgray]
Unconnected [ label=Unconnected ]
CommTrouble [ shape=record,
label="{communication loss|{Timeout|BrokenPipe|NetworkFailure}}" ]
node [fontcolor=gray]
subgraph cluster_try_connect {
label="try to connect, handshake"
rank=max
WFConnection [ label=WFConnection ]
WFReportParams [ label=WFReportParams ]
}
TearDown [ label=TearDown ]
Connected [ label=Connected,style=filled,fillcolor=green,fontcolor=black ]
node [fontcolor=lightblue]
StartingSyncS [ label=StartingSyncS ]
StartingSyncT [ label=StartingSyncT ]
subgraph cluster_bitmap_exchange {
node [fontcolor=red]
fontcolor=red
label="new application (WRITE?) requests blocked\lwhile bitmap is exchanged"
WFBitMapT [ label=WFBitMapT ]
WFSyncUUID [ label=WFSyncUUID ]
WFBitMapS [ label=WFBitMapS ]
}
node [fontcolor=blue]
cluster_resync [ shape=record,label="{<any>resynchronisation process running\l'concurrent' application requests allowed|{{<T>PausedSyncT\nSyncTarget}|{<S>PausedSyncS\nSyncSource}}}" ]
node [shape=box,fontcolor=black]
// drbdadm [label="drbdadm connect"]
// handshake [label="drbd_connect()\ndrbd_do_handshake\ndrbd_sync_handshake() etc."]
// comm_error [label="communication trouble"]
//
// edges
// --------------------------------------
StandAlone -> Unconnected [ label="drbdadm connect" ]
Unconnected -> StandAlone [ label="drbdadm disconnect\lor serious communication trouble" ]
Unconnected -> WFConnection [ label="receiver thread is started" ]
WFConnection -> WFReportParams [ headlabel="accept()\land/or \lconnect()\l" ]
WFReportParams -> StandAlone [ label="during handshake\lpeers do not agree\labout something essential" ]
WFReportParams -> Connected [ label="data identical\lno sync needed",color=green,fontcolor=green ]
WFReportParams -> WFBitMapS
WFReportParams -> WFBitMapT
WFBitMapT -> WFSyncUUID [minlen=0.1,constraint=false]
WFBitMapS -> cluster_resync:S
WFSyncUUID -> cluster_resync:T
edge [color=green]
cluster_resync:any -> Connected [ label="resnyc done",fontcolor=green ]
edge [color=red]
WFReportParams -> CommTrouble
Connected -> CommTrouble
cluster_resync:any -> CommTrouble
edge [color=black]
CommTrouble -> Unconnected [label="receiver thread is stopped" ]
}
......@@ -2,6 +2,6 @@
#include <linux/drbd_config.h>
const char *drbd_buildtag(void)
{
return "GIT-hash: 2f1a0b8bfe96b74872f056b4d0fc14faa6c87b3b drbd/drbd_actlog.c drbd/drbd_bitmap.c drbd/drbd_int.h drbd/drbd_main.c drbd/drbd_nl.c drbd/drbd_receiver.c drbd/drbd_req.c drbd/drbd_req.h drbd/drbd_worker.c"
" build by phil@fat-tyre, 2009-04-16 15:21:58";
return "GIT-hash: ae6080852f8359c8c175f90c3f3daa01409e1d1c drbd/linux/drbd.h"
" build by phil@fat-tyre, 2009-04-17 15:14:48";
}
......@@ -31,6 +31,7 @@
#include <linux/file.h>
#include <linux/slab.h>
#include <linux/connector.h>
#include <linux/drbd_config.h>
#include <linux/drbd.h>
#include <linux/blkpg.h>
#include <linux/cpumask.h>
......
......@@ -32,6 +32,7 @@
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/drbd_config.h>
#include <linux/drbd.h>
#include "drbd_int.h"
#include "lru_cache.h" /* for lc_sprintf_stats */
......
......@@ -25,7 +25,6 @@
*/
#ifndef DRBD_H
#define DRBD_H
#include <linux/drbd_config.h>
#include <linux/connector.h>
#include <asm/types.h>
......@@ -39,9 +38,9 @@
#include <limits.h>
/* Altough the Linux source code makes a difference between
generic endiness and the bitfields' endianess, there is no
architecture as of Linux-2.6.24-rc4 where the bitfileds' endianess
does not match the generic endianess. */
generic endianness and the bitfields' endianness, there is no
architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness
does not match the generic endianness. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define __LITTLE_ENDIAN_BITFIELD
......@@ -86,8 +85,7 @@ enum after_sb_handler {
Violently
};
/* KEEP the order, do not delete or insert!
* Or change the API_VERSION, too. */
/* KEEP the order, do not delete or insert. Only append. */
enum ret_codes {
RetCodeBase = 100,
NoError, /* 101 ... */
......@@ -245,13 +243,6 @@ union drbd_state_t {
unsigned role:2 ; /* 3/4 primary/secondary/unknown */
#else
# error "this endianess is not supported"
#endif
#ifndef DRBD_DEBUG_STATE_CHANGES
#define DRBD_DEBUG_STATE_CHANGES 0
#endif
#if DRBD_DEBUG_STATE_CHANGES
unsigned int line;
const char *func;
#endif
};
unsigned int i;
......@@ -290,10 +281,6 @@ extern const char *roles_to_name(enum drbd_role);
extern const char *disks_to_name(enum drbd_disk_state);
extern const char *set_st_err_name(enum set_st_err);
#ifndef BDEVNAME_SIZE
# define BDEVNAME_SIZE 32
#endif
#define SHARED_SECRET_MAX 64
enum MetaDataFlags {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment