Commit 1ff8d0aa authored by Philipp Reisner's avatar Philipp Reisner

Removing CamelCase, minor cleanups

9b8b170585e2959d552b0ba592b649d758b933b8 Merge branch 'drbd-8.3' into drbd-8.3-cleanups
1922274c822b34cf4b66843819ccfed97e1da4f1 Improvements to drbd_nl_net_conf()  * Removing macros  * Fixed the code for
1a59b007715215697968cfaed3f2f159d262c030 Removing a workaround for bugs in blk_queue_stack_limits() in older kernels
56d788e4fa7a4809fc41f8c17a02032fb8793080 Merge branch 'drbd-8.3' into drbd-8.3-cleanups
a95b4cfb595ced59ca6d2b26d450fd7e5e08fec8 The coding style guide says: Constants are ALL_CAPS
84cc8259557954b39fa8b0c57931b08cdc3df3f6 Merge branch 'drbd-8.2' into drbd-8.3
555b9f742cce70430a5769a35128ee3fa06fa9f4 Merge branch 'drbd-8.0' into drbd-8.2
f96e2776b2e49ef992d43a624d7c6be7d0610bfa Removing CamelCase from structs, enums and unions
727aca1fcc001381ab6f0a7229fa7db54b9431ea Removing '#if 0' code
546cbdec6779e997a37eac0d3762f4e0a3a390f2 Changing the remaining constants to UPPER_CASE only
57e478a0d328405ed97c3bada9d617e5d21a3868 Merge branch 'drbd-8.3' into drbd-8.3-cleanups
23b99bfb4ceca5a00c180620ac3f6db91edf7f85 Andi does not want to get it CC, he prefers to pick it off LKML
d362ab639c966107670f4b375cbff757314f5cba Changing the remaining constants to UPPER_CASE only
6fe98c4f0302a28174dd3a852e72fbc6a0caa45e Merge branch 'drbd-8.2' into drbd-8.3
ff327744475ffc66795fc49dcdc232b21589185e Changing the remaining constants to UPPER_CASE only
185392bf5ce63936a5c424b97e38512ab4bcfdb7 Merge branch 'drbd-8.0' into drbd-8.2
5f87618f7272e9ef92b17b2b7c36dcc1c3d59031 Making all constants UPPER_CASE only
2ebf5224634bf5fda709fb54b43a5de6e3c10bee Adding explicit numbers to the return codes to user space
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 67ebb6d6
......@@ -223,7 +223,7 @@ void drbd_al_begin_io(struct drbd_conf *mdev, sector_t sector)
D_ASSERT(atomic_read(&mdev->local_cnt) > 0);
MTRACE(TraceTypeALExts, TraceLvlMetrics,
MTRACE(TRACE_TYPE_AL_EXTS, TRACE_LVL_METRICS,
dev_info(DEV, "al_begin_io( sec=%llus (al_enr=%u) (rs_enr=%d) )\n",
(unsigned long long) sector, enr,
(int)BM_SECT_TO_EXT(sector));
......@@ -260,7 +260,7 @@ void drbd_al_complete_io(struct drbd_conf *mdev, sector_t sector)
struct lc_element *extent;
unsigned long flags;
MTRACE(TraceTypeALExts, TraceLvlMetrics,
MTRACE(TRACE_TYPE_AL_EXTS, TRACE_LVL_METRICS,
dev_info(DEV, "al_complete_io( sec=%llus (al_enr=%u) (rs_enr=%d) )\n",
(unsigned long long) sector, enr,
(int)BM_SECT_TO_EXT(sector));
......@@ -305,7 +305,7 @@ w_al_write_transaction(struct drbd_conf *mdev, struct drbd_work *w, int unused)
* TODO reduce maximum latency:
* submit both bios, then wait for both,
* instead of doing two synchronous sector writes. */
if (mdev->state.conn < Connected && evicted != LC_FREE)
if (mdev->state.conn < C_CONNECTED && evicted != LC_FREE)
drbd_bm_write_sect(mdev, evicted/AL_EXT_PER_BM_SECT);
mutex_lock(&mdev->md_io_mutex); /* protects md_io_page, al_tr_cycle, ... */
......@@ -607,7 +607,7 @@ STATIC int atodb_prepare_unless_covered(struct drbd_conf *mdev,
atomic_inc(&wc->count);
/* we already know that we may do this...
* inc_local_if_state(mdev,Attaching);
* inc_local_if_state(mdev,D_ATTACHING);
* just get the extra reference, so that the local_cnt reflects
* the number of pending IO requests DRBD at its backing device.
*/
......@@ -629,7 +629,7 @@ out_bio_put:
* drbd_al_to_on_disk_bm:
* Writes the areas of the bitmap which are covered by the AL.
* called when we detach (unconfigure) local storage,
* or when we go from Primary to Secondary state.
* or when we go from R_PRIMARY to R_SECONDARY state.
*/
void drbd_al_to_on_disk_bm(struct drbd_conf *mdev)
{
......@@ -638,7 +638,7 @@ void drbd_al_to_on_disk_bm(struct drbd_conf *mdev)
struct bio **bios;
struct drbd_atodb_wait wc;
ERR_IF (!inc_local_if_state(mdev, Attaching))
ERR_IF (!inc_local_if_state(mdev, D_ATTACHING))
return; /* sorry, I don't have any act_log etc... */
wait_event(mdev->al_wait, lc_try_lock(mdev->act_log));
......@@ -763,7 +763,7 @@ static inline int _try_lc_del(struct drbd_conf *mdev, struct lc_element *al_ext)
lc_del(mdev->act_log, al_ext);
spin_unlock_irq(&mdev->al_lock);
MTRACE(TraceTypeALExts, TraceLvlMetrics,
MTRACE(TRACE_TYPE_AL_EXTS, TRACE_LVL_METRICS,
if (unlikely(!rv))
dev_info(DEV, "Waiting for extent in drbd_al_shrink()\n");
);
......@@ -810,8 +810,8 @@ STATIC int w_update_odbm(struct drbd_conf *mdev, struct drbd_work *w, int unused
if (drbd_bm_total_weight(mdev) <= mdev->rs_failed) {
switch (mdev->state.conn) {
case SyncSource: case SyncTarget:
case PausedSyncS: case PausedSyncT:
case C_SYNC_SOURCE: case C_SYNC_TARGET:
case C_PAUSED_SYNC_S: case C_PAUSED_SYNC_T:
drbd_resync_finished(mdev);
default:
/* nothing to do */
......@@ -860,7 +860,7 @@ STATIC void drbd_try_clear_on_disk_bm(struct drbd_conf *mdev, sector_t sector,
dump_stack();
lc_put(mdev->resync, &ext->lce);
drbd_force_state(mdev, NS(conn, Disconnecting));
drbd_force_state(mdev, NS(conn, C_DISCONNECTING));
return;
}
} else {
......@@ -916,7 +916,7 @@ STATIC void drbd_try_clear_on_disk_bm(struct drbd_conf *mdev, sector_t sector,
* size byte of data starting from sector. Only clear a bits of the affected
* one ore more _aligned_ BM_BLOCK_SIZE blocks.
*
* called by worker on SyncTarget and receiver on SyncSource.
* called by worker on C_SYNC_TARGET and receiver on SyncSource.
*
*/
void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, int size,
......@@ -953,7 +953,7 @@ void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, int size,
ebnr = BM_SECT_TO_BIT(esector - (BM_SECT_PER_BIT-1));
sbnr = BM_SECT_TO_BIT(sector + BM_SECT_PER_BIT-1);
MTRACE(TraceTypeResync, TraceLvlMetrics,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_METRICS,
dev_info(DEV, "drbd_set_in_sync: sector=%llus size=%u sbnr=%lu ebnr=%lu\n",
(unsigned long long)sector, size, sbnr, ebnr);
);
......@@ -973,8 +973,8 @@ void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, int size,
/* should be roling marks,
* but we estimate only anyways. */
if (mdev->rs_mark_left != drbd_bm_total_weight(mdev) &&
mdev->state.conn != PausedSyncT &&
mdev->state.conn != PausedSyncS) {
mdev->state.conn != C_PAUSED_SYNC_T &&
mdev->state.conn != C_PAUSED_SYNC_S) {
mdev->rs_mark_time = jiffies;
mdev->rs_mark_left = drbd_bm_total_weight(mdev);
}
......@@ -1032,7 +1032,7 @@ void __drbd_set_out_of_sync(struct drbd_conf *mdev, sector_t sector, int size,
sbnr = BM_SECT_TO_BIT(sector);
ebnr = BM_SECT_TO_BIT(esector);
MTRACE(TraceTypeResync, TraceLvlMetrics,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_METRICS,
dev_info(DEV, "drbd_set_out_of_sync: sector=%llus size=%u "
"sbnr=%lu ebnr=%lu\n",
(unsigned long long)sector, size, sbnr, ebnr);
......@@ -1133,7 +1133,7 @@ int drbd_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
struct bm_extent *bm_ext;
int i, sig;
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "drbd_rs_begin_io: sector=%llus (rs_end=%d)\n",
(unsigned long long)sector, enr);
);
......@@ -1183,7 +1183,7 @@ int drbd_try_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
struct bm_extent *bm_ext;
int i;
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "drbd_try_rs_begin_io: sector=%llus\n",
(unsigned long long)sector);
);
......@@ -1203,7 +1203,7 @@ int drbd_try_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
* the lc_put here...
* we also have to wake_up
*/
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "dropping %u, aparently got 'synced' "
"by application io\n", mdev->resync_wenr);
);
......@@ -1232,7 +1232,7 @@ int drbd_try_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
* but then could not set BME_LOCKED,
* so we tried again.
* drop the extra reference. */
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "dropping extra reference on %u\n", enr);
);
bm_ext->lce.refcnt--;
......@@ -1241,7 +1241,7 @@ int drbd_try_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
goto check_al;
} else {
if (mdev->resync_locked > mdev->resync->nr_elements-3) {
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "resync_locked = %u!\n", mdev->resync_locked);
);
goto try_again;
......@@ -1268,7 +1268,7 @@ int drbd_try_rs_begin_io(struct drbd_conf *mdev, sector_t sector)
goto check_al;
}
check_al:
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "checking al for %u\n", enr);
);
for (i = 0; i < AL_EXT_PER_BM_SECT; i++) {
......@@ -1284,7 +1284,7 @@ proceed:
return 0;
try_again:
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "need to try again for %u\n", enr);
);
if (bm_ext)
......@@ -1299,7 +1299,7 @@ void drbd_rs_complete_io(struct drbd_conf *mdev, sector_t sector)
struct bm_extent *bm_ext;
unsigned long flags;
MTRACE(TraceTypeResync, TraceLvlAll,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_ALL,
dev_info(DEV, "drbd_rs_complete_io: sector=%llus (rs_enr=%d)\n",
(long long)sector, enr);
);
......@@ -1336,13 +1336,13 @@ void drbd_rs_complete_io(struct drbd_conf *mdev, sector_t sector)
*/
void drbd_rs_cancel_all(struct drbd_conf *mdev)
{
MTRACE(TraceTypeResync, TraceLvlMetrics,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_METRICS,
dev_info(DEV, "drbd_rs_cancel_all\n");
);
spin_lock_irq(&mdev->al_lock);
if (inc_local_if_state(mdev, Failed)) { /* Makes sure ->resync is there. */
if (inc_local_if_state(mdev, D_FAILED)) { /* Makes sure ->resync is there. */
lc_reset(mdev->resync);
dec_local(mdev);
}
......@@ -1363,13 +1363,13 @@ int drbd_rs_del_all(struct drbd_conf *mdev)
struct bm_extent *bm_ext;
int i;
MTRACE(TraceTypeResync, TraceLvlMetrics,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_METRICS,
dev_info(DEV, "drbd_rs_del_all\n");
);
spin_lock_irq(&mdev->al_lock);
if (inc_local_if_state(mdev, Failed)) {
if (inc_local_if_state(mdev, D_FAILED)) {
/* ok, ->resync is there. */
for (i = 0; i < mdev->resync->nr_elements; i++) {
bm_ext = (struct bm_extent *) lc_entry(mdev->resync, i);
......@@ -1406,7 +1406,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev)
/* Record information on a failure to resync the specified blocks
*
* called on SyncTarget when resync write fails or NegRSDReply received
* called on C_SYNC_TARGET when resync write fails or P_NEG_RS_DREPLY received
*
*/
void drbd_rs_failed_io(struct drbd_conf *mdev, sector_t sector, int size)
......@@ -1417,7 +1417,7 @@ void drbd_rs_failed_io(struct drbd_conf *mdev, sector_t sector, int size)
sector_t esector, nr_sectors;
int wake_up = 0;
MTRACE(TraceTypeResync, TraceLvlSummary,
MTRACE(TRACE_TYPE_RESYNC, TRACE_LVL_SUMMARY,
dev_info(DEV, "drbd_rs_failed_io: sector=%llus, size=%u\n",
(unsigned long long)sector, size);
);
......
......@@ -580,7 +580,7 @@ unsigned long drbd_bm_total_weight(struct drbd_conf *mdev)
unsigned long flags;
/* if I don't have a disk, I don't know about out-of-sync status */
if (!inc_local_if_state(mdev, Negotiating))
if (!inc_local_if_state(mdev, D_NEGOTIATING))
return 0;
ERR_IF(!b) return 0;
......@@ -842,7 +842,7 @@ STATIC int bm_rw(struct drbd_conf *mdev, int rw) __must_hold(local)
drbd_blk_run_queue(bdev_get_queue(mdev->bc->md_bdev));
wait_event(b->bm_io_wait, atomic_read(&b->bm_async_io) == 0);
MTRACE(TraceTypeMDIO, TraceLvlSummary,
MTRACE(TRACE_TYPE_MD_IO, TRACE_LVL_SUMMARY,
dev_info(DEV, "%s of bitmap took %lu jiffies\n",
rw == READ ? "reading" : "writing", jiffies - now);
);
......
......@@ -2,6 +2,6 @@
#include <linux/drbd_config.h>
const char *drbd_buildtag(void)
{
return "GIT-hash: ae6080852f8359c8c175f90c3f3daa01409e1d1c drbd/linux/drbd.h"
" build by phil@fat-tyre, 2009-04-17 15:14:48";
return "GIT-hash: 1a59b007715215697968cfaed3f2f159d262c030 drbd/drbd_nl.c"
" build by phil@fat-tyre, 2009-04-22 11:36:29";
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -178,7 +178,7 @@ STATIC int drbd_seq_show(struct seq_file *seq, void *v)
pe .. pending (waiting for ack or data reply)
ua .. unack'd (still need to send ack or data reply)
ap .. application requests accepted, but not yet completed
ep .. number of epochs currently "on the fly", BarrierAck pending
ep .. number of epochs currently "on the fly", P_BARRIER_ACK pending
wo .. write ordering mode currently in use
oos .. known out-of-sync kB
*/
......@@ -196,9 +196,9 @@ STATIC int drbd_seq_show(struct seq_file *seq, void *v)
sn = conns_to_name(mdev->state.conn);
if (mdev->state.conn == StandAlone &&
mdev->state.disk == Diskless &&
mdev->state.role == Secondary) {
if (mdev->state.conn == C_STANDALONE &&
mdev->state.disk == D_DISKLESS &&
mdev->state.role == R_SECONDARY) {
seq_printf(seq, "%2d: cs:Unconfigured\n", i);
} else {
seq_printf(seq,
......@@ -234,11 +234,11 @@ STATIC int drbd_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, " oos:%lu\n",
Bit2KB(drbd_bm_total_weight(mdev)));
}
if (mdev->state.conn == SyncSource ||
mdev->state.conn == SyncTarget)
if (mdev->state.conn == C_SYNC_SOURCE ||
mdev->state.conn == C_SYNC_TARGET)
drbd_syncer_progress(mdev, seq);
if (mdev->state.conn == VerifyS || mdev->state.conn == VerifyT)
if (mdev->state.conn == C_VERIFY_S || mdev->state.conn == C_VERIFY_T)
seq_printf(seq, "\t%3d%% %lu/%lu\n",
(int)((mdev->rs_total-mdev->ov_left) /
(mdev->rs_total/100+1)),
......@@ -246,7 +246,7 @@ STATIC int drbd_seq_show(struct seq_file *seq, void *v)
mdev->rs_total);
#ifdef ENABLE_DYNAMIC_TRACE
if (proc_details >= 1 && inc_local_if_state(mdev, Failed)) {
if (proc_details >= 1 && inc_local_if_state(mdev, D_FAILED)) {
lc_printf_stats(seq, mdev->resync);
lc_printf_stats(seq, mdev->act_log);
dec_local(mdev);
......
This diff is collapsed.
This diff is collapsed.
......@@ -39,7 +39,7 @@
Try to get the locking right :) */
/*
* Objects of type struct drbd_request do only exist on a Primary node, and are
* Objects of type struct drbd_request do only exist on a R_PRIMARY node, and are
* associated with IO requests originating from the block layer above us.
*
* There are quite a few things that may happen to a drbd request
......@@ -168,7 +168,7 @@ enum drbd_req_state_bits {
__RQ_NET_SENT,
/* when set, the request may be freed (if RQ_NET_QUEUED is clear).
* basically this means the corresponding BarrierAck was received */
* basically this means the corresponding P_BARRIER_ACK was received */
__RQ_NET_DONE,
/* whether or not we know (C) or pretend (B,A) that the write
......
......@@ -26,90 +26,88 @@
#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"
[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[] = {
[Primary] = "Primary",
[Secondary] = "Secondary",
[Unknown] = "Unknown"
[R_PRIMARY] = "Primary",
[R_SECONDARY] = "Secondary",
[R_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",
[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_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",
[-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 > PausedSyncT ? "TOO_LARGE" : drbd_conn_s_names[s];
return s > C_PAUSED_SYNC_T ? "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];
return s > R_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];
return s > D_UP_TO_DATE ? "TOO_LARGE" : drbd_disk_s_names[s];
}
const char *set_st_err_name(enum set_st_err err)
const char *set_st_err_name(enum drbd_state_ret_codes err)
{
return err <= SS_AfterLastError ? "TOO_SMALL" :
err > SS_TwoPrimaries ? "TOO_LARGE"
return err <= SS_AFTER_LAST_ERROR ? "TOO_SMALL" :
err > SS_TWO_PRIMARIES ? "TOO_LARGE"
: drbd_state_sw_errors[-err];
}
This diff is collapsed.
This diff is collapsed.
......@@ -47,7 +47,7 @@
#define DRBD_TIMEOUT_MAX 600
#define DRBD_TIMEOUT_DEF 60 /* 6 seconds */
/* active connection retries when WFConnection */
/* active connection retries when C_WF_CONNECTION */
#define DRBD_CONNECT_INT_MIN 1
#define DRBD_CONNECT_INT_MAX 120
#define DRBD_CONNECT_INT_DEF 10 /* seconds */
......@@ -118,12 +118,12 @@
#define DRBD_DISK_SIZE_SECT_MAX (16 * (2LLU << 30))
#define DRBD_DISK_SIZE_SECT_DEF 0 /* = disabled = no user size... */
#define DRBD_ON_IO_ERROR_DEF PassOn
#define DRBD_FENCING_DEF DontCare
#define DRBD_AFTER_SB_0P_DEF Disconnect
#define DRBD_AFTER_SB_1P_DEF Disconnect
#define DRBD_AFTER_SB_2P_DEF Disconnect
#define DRBD_RR_CONFLICT_DEF Disconnect
#define DRBD_ON_IO_ERROR_DEF EP_PASS_ON
#define DRBD_FENCING_DEF FP_DONT_CARE
#define DRBD_AFTER_SB_0P_DEF ASB_DISCONNECT
#define DRBD_AFTER_SB_1P_DEF ASB_DISCONNECT
#define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT
#define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT
#define DRBD_MAX_BIO_BVECS_MIN 0
#define DRBD_MAX_BIO_BVECS_MAX 128
......
......@@ -93,7 +93,7 @@ NL_PACKET(get_state, 17,
)
NL_PACKET(get_uuids, 18,
NL_STRING( 34, T_MAY_IGNORE, uuids, (UUID_SIZE*sizeof(__u64)))
NL_STRING( 34, T_MAY_IGNORE, uuids, (UI_SIZE*sizeof(__u64)))
NL_INTEGER( 35, T_MAY_IGNORE, uuids_flags)
)
......
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