[DRBD-cvs] svn commit by lars - r2702 - in trunk: . benchmark
debian documentation drbd drbd/linux scripts testing tools
user - * no functional change * sorry for all the whitespace a
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Tue Jan 16 19:51:19 CET 2007
Author: lars
Date: 2007-01-16 19:51:07 +0100 (Tue, 16 Jan 2007)
New Revision: 2702
Removed:
trunk/benchmark/report_to_html.pl
trunk/benchmark/run.sh
Modified:
trunk/ChangeLog
trunk/INSTALL
trunk/Makefile
trunk/README
trunk/ROADMAP
trunk/benchmark/Makefile
trunk/benchmark/dm.c
trunk/debian/copyright
trunk/debian/drbd8-utils.postinst
trunk/documentation/Makefile
trunk/documentation/Makefile.lang
trunk/documentation/drbd.conf.sgml
trunk/documentation/drbd.sgml
trunk/documentation/drbdadm.sgml
trunk/documentation/drbddisk.sgml
trunk/documentation/drbdmeta.sgml
trunk/documentation/drbdsetup.sgml
trunk/drbd.spec.in
trunk/drbd/Makefile
trunk/drbd/Makefile-2.6
trunk/drbd/drbd_actlog.c
trunk/drbd/drbd_bitmap.c
trunk/drbd/drbd_compat_wrappers.h
trunk/drbd/drbd_int.h
trunk/drbd/drbd_main.c
trunk/drbd/drbd_nl.c
trunk/drbd/drbd_proc.c
trunk/drbd/drbd_receiver.c
trunk/drbd/drbd_req.c
trunk/drbd/drbd_req.h
trunk/drbd/drbd_strings.c
trunk/drbd/drbd_worker.c
trunk/drbd/linux/drbd.h
trunk/drbd/linux/drbd_limits.h
trunk/drbd/linux/drbd_nl.h
trunk/drbd/linux/drbd_tag_magic.h
trunk/drbd/lru_cache.c
trunk/drbd/lru_cache.h
trunk/scripts/Makefile
trunk/scripts/drbd
trunk/scripts/drbd.conf
trunk/scripts/drbd.gentoo
trunk/scripts/drbddisk
trunk/scripts/get_uts_release.sh
trunk/scripts/outdate-peer.sh
trunk/scripts/patch-kernel
trunk/testing/access_and_verify.c
trunk/testing/show_size.c
trunk/tools/README
trunk/tools/dopd.c
trunk/tools/dopd.h
trunk/tools/drbd-peer-outdater.c
trunk/user/Makefile
trunk/user/drbdadm.h
trunk/user/drbdadm_adjust.c
trunk/user/drbdadm_main.c
trunk/user/drbdadm_parser.c
trunk/user/drbdadm_parser.h
trunk/user/drbdadm_scanner.fl
trunk/user/drbdadm_usage_cnt.c
trunk/user/drbdmeta.c
trunk/user/drbdmeta_scanner.fl
trunk/user/drbdsetup.c
trunk/user/drbdtool_common.c
Log:
* no functional change
* sorry for all the whitespace adjustments :->
* fixed copyrights, its 2007 now...
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/ChangeLog 2007-01-16 18:51:07 UTC (rev 2702)
@@ -7,7 +7,7 @@
8.0rc1 (api:86/proto:85)
--------
* The drbd-peer-outdater got updated to work in multi node heartbeat
- clusters. (But we still not suceeded to get this into Heartbeat's
+ clusters. (But we still not suceeded to get this into Heartbeat's
repository accepted.)
* Fixed resync decission after a crash in a pri-pri cluster.
* Implemented the ping-timeout option for "sub-second" failover clusters.
@@ -30,7 +30,7 @@
* The request code was completely rewritten.
* The write conflict detection code for primary-primary is currently
broken, but will be fixed soon.
- * drbdsetup is no longer based on IOCTL but works now via
+ * drbdsetup is no longer based on IOCTL but works now via
netlink/connector.
* drbd_panic() is on its way out.
* A runtime configurable tracing framework got added.
@@ -54,7 +54,7 @@
* Fixes for 64bit kernel / 32 bit userland environments
* Fixes in the sys-v init script
* Renamed "--do-what-I-say" to "--overwrite-data-of-peer". Hopefully
- people now understand what this option does.
+ people now understand what this option does.
8.0-pre2 (api:81/proto:80)
--------
@@ -76,9 +76,9 @@
* Improved, tunable after-split-brain recovery strategies.
* Always verify all IDs used in the protocol that are used as pointers.
* Introduced the "outdate" disk state, and commands for managing it.
- * Introduced the "drbdmeta" command, and require the user to create
+ * Introduced the "drbdmeta" command, and require the user to create
meta-data explicitly.
- * Support for primary/primary (for OCFS2, GFS...)
+ * Support for primary/primary (for OCFS2, GFS...)
* Replaced the sync-groups with the sync-after mechanism.
* The "common" section in the configuration file.
* Replaced the generation counters (GCs) with data-generation-UUIDs
@@ -94,6 +94,6 @@
* Changed internal APIs so that missed writes of the meta-data super
block are reported as they happen.
* The http://usage.drbd.org sub project.
- * Rewrote the scanner/parser of drbd.conf. 10 times smaller/faster and
+ * Rewrote the scanner/parser of drbd.conf. 10 times smaller/faster and
easier to maintain.
* Asynchronous meta-data IO [ Code drop from the DRBD+ branch ]
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/INSTALL 2007-01-16 18:51:07 UTC (rev 2702)
@@ -31,7 +31,7 @@
files. If so, skip the "Prepare" section, and just jump to "Build DRBD".
rpm.distros# rpm -Uhv kernel-source-2.4.XX-YYY.rpm
- debian# apt-get install kernel-source
+ debian# apt-get install kernel-source
kernel.org# tar --bzip2 -xvf linux-2.4.XX.tar.bz2
Note: this is really kernel-source.rpm, NOT kernel.src.rpm.
@@ -129,7 +129,7 @@
now build the module
Note:
- On some distros (redhat/fedora typically), you first need to have a
+ On some distros (redhat/fedora typically), you first need to have a
look into ./drbd_config.h, and (un)comment some of the
settings appropriately, if not done automagically already.
@@ -168,7 +168,7 @@
You with "make menuconfig" or "make xconfig", you should find DRBD in
the block-devices menu, select it as module, or as part of the
kernel.
-
+
Rebuild the kernel modules ("make modules; make modules_install"),
or rebuild and install the new kernel
("make bzImage" or "make linux ARCH=um" or ...)
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,7 +1,11 @@
# Makefile for drbd
#
-# This file is part of drbd by Philipp Reisner
+# This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
#
+# Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+# Copyright (C) 2001-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+# Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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)
@@ -18,7 +22,7 @@
#
# TODO move some of the more cryptic bash scriptlets here into scripts/*
-# and call those from here. -- lge
+# and call those from here. -- lge
#PREFIX = /usr/local
@@ -48,7 +52,7 @@
all: tools module
-module:
+module:
@if [ -z "$(KVER)" ]; then \
echo "Could not determine uts_release" ; \
false ; \
@@ -132,7 +136,7 @@
# so the tgz and therefore rpm target will work within
# an extracted tarball, too.
# to generate a distribution tarball, use make tarball,
-# which will regenerate .filelist
+# which will regenerate .filelist
tgz:
test -e .filelist
ln -sf drbd/linux/drbd_config.h drbd_config.h
Modified: trunk/README
===================================================================
--- trunk/README 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/README 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,12 +1,14 @@
- DRBD
- ======
- by Philipp Reisner
-
+ DRBD
+ ======
+ by Philipp Reisner
+ and Lars Ellenberg
+ LINBIT Information Technologies
+
Reference documentation is included in the documentation directory.
Please refer to the web pages at
-http://www.drbd.org/ and
+http://www.drbd.org/ and
http://www.linux-ha.org/DRBD
http://www.linux-ha.org/DRBD/FAQ
to find maintained information.
@@ -24,8 +26,9 @@
If you don't know what ksymoops is, read
/usr/src/linux/Documentation/oops-tracing.txt
-BUILD RPMS:
+Need RPMS?
-----------
-Read INSTALL.
+Have a look at http://www.linbit.com/support/drbd-current/
+or Read INSTALL.
Modified: trunk/ROADMAP
===================================================================
--- trunk/ROADMAP 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/ROADMAP 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,8 +1,8 @@
DRBD 0.8 Roadmap
----------------
-1 Drop support for linux-2.4.x.
- Do all size calculations on the base of sectors (512 Byte) as it
+1 Drop support for linux-2.4.x.
+ Do all size calculations on the base of sectors (512 Byte) as it
is common in Linux-2.6.x.
(Currently they are done on a 1k base, for 2.4.x compatibility)
90% DONE
@@ -14,8 +14,8 @@
to that huge receive_params() function we had before.
40% DONE
-3 Authenticate the peer upon connect by using a shared secret.
- Configuration file syntax: net { cram-hmac-alg "sha1";
+3 Authenticate the peer upon connect by using a shared secret.
+ Configuration file syntax: net { cram-hmac-alg "sha1";
shared-secret "secret-word"; }
Using a challenge-response authentication.
99% DONE
@@ -23,7 +23,7 @@
4 Consolidate state changes into a central function, that makes
sure that the new state is valid. Replace set_cstate() with
a force_state() and a request_state() function. Make all
- state changes atomic, and consolidate the many differenct
+ state changes atomic, and consolidate the many differenct
cstate-error states into a single "NetworkFailure" state.
50% DONE
@@ -31,18 +31,18 @@
of DRBDs behaviour after a split-brain situation:
In case the nodes of your cluster nodes see each other again, after
- an split brain situation in which both nodes where primary
+ an split brain situation in which both nodes where primary
at the same time, you have two diverged versions of your data.
-
+
In case both nodes are secondary you can control DRBD's
auto recovery strategy by the "after-sb-0pri" options. The
- default is to disconnect.
+ default is to disconnect.
"disconnect" ... No automatic resynchronisation, simply disconnect.
"discard-younger-primary"
Auto sync from the node that was primary before
the split brain situation happened.
"discard-older-primary"
- Auto sync from the node that became primary
+ Auto sync from the node that became primary
as second during the split brain situation.
If discard-younger-primary and discard-older-primary
can not find a decissions, they fall back to
@@ -51,7 +51,7 @@
Auto sync from the node that modified
blocks during the split brain situation, but only
if the target not did not touched a single block.
- If both nodes touched their data, this policy
+ If both nodes touched their data, this policy
falls back to disconnect.
"discard-least-changes"
Auto sync from the node that touched more
@@ -61,9 +61,9 @@
In one of the nodes is already primary, then the auto-recovery
strategie is controled by the "after-sb-1pri" options.
- "disconnect" ... always disconnect
+ "disconnect" ... always disconnect
"consensus" ... discard the version of the secondary if the outcome
- of the "after-sb-0pri" algorithm would also destroy
+ of the "after-sb-0pri" algorithm would also destroy
the current secondary's data. Otherwise disconnect.
"violently-as0p" Always take the decission of the "after-sb-0pri"
algorithm. Even if that causes case an erratic change
@@ -73,13 +73,13 @@
flag, _AND_ you really know what you are doing.
This is DANGEROUS and MAY CRASH YOUR MACHINE if you
have a FS mounted on the primary node.
- "discard-secondary"
+ "discard-secondary"
discard the version of the secondary.
- "call-pri-lost-after-sb"
+ "call-pri-lost-after-sb"
Always honour the outcome of the "after-sb-2sc"
algorithm. In case it decides that the current
secondary has the right data, it tries to make
- the current primary secondary, if that fails
+ the current primary secondary, if that fails
it calls the "pri-lost-after-sb" helper program
on the current primary. That helper program is
expected to halt the machine.
@@ -116,35 +116,35 @@
command) gets a short-living flag called "--discard-my-data".
99% DONE
-6 It is possible that a secondary node crashes a primary by
- returning invalid block_ids in ACK packets. [This might be
+6 It is possible that a secondary node crashes a primary by
+ returning invalid block_ids in ACK packets. [This might be
either caused by faulty hardware, or by a hostile modification
of DRBD on the secondary node]
Proposed solution:
Have a hash table (hlist_head style), add the collision
- member (hlist_node) to drbd_request.
+ member (hlist_node) to drbd_request.
Use the sector number of the drbd_request as key to the hash, each
- drbd_request is also put into this hash table. We still use the
- pointer as block_id.
+ drbd_request is also put into this hash table. We still use the
+ pointer as block_id.
When we get an ACK packet, we lookup the hash table with the
- block_id, and may find the drbd_request there. Otherwise it
+ block_id, and may find the drbd_request there. Otherwise it
was a forged ACK.
Note: The actual key to the hash should be (sector & ~0x7).
See item 9 for more details.
99% DONE
-7 Handle split brain situations; Support IO fencing;
-
+7 Handle split brain situations; Support IO fencing;
+
New commands:
drbdadm outdate r0
When the device is configured this works via an ioctl() call.
- In the other case it modifies the meta data directly by
+ In the other case it modifies the meta data directly by
calling drbdmeta.
remove option: on-disconnect
@@ -160,11 +160,11 @@
outdate-peer "some script";
}
- If the disk state of the peer is unknown, drbd calls this
+ If the disk state of the peer is unknown, drbd calls this
handler (yes a call to userspace from kernel space). The handler's
returncodes are:
- 3 -> peer is inconsistent
+ 3 -> peer is inconsistent
4 -> peer is outdated (this handler outdated it) [ resource fencing ]
5 -> peer was down / unreachable
6 -> peer is primary
@@ -184,17 +184,17 @@
P/? - - S/? network breaks ; N1 freezes IO
P/? - - S/? N1 fences N2:
In the STONITH case: turn off N2.
- In the resource fencing case:
+ In the resource fencing case:
N1 asks N2 to fence itself from the storage via cnet.
HB calls "drbdadm outdate r0" on N2.
N2 replies to N1 that fencing is done via cnet.
The outdate-peer script on N1 returns sucess to DRBD.
P/D - - S/? N1 thaws IO
- N2 got the the "Outdated" flag set in its meta-data, by the outdate
- command.
+ N2 got the the "Outdated" flag set in its meta-data, by the outdate
+ command.
- The fencing is set to resource-only enables this behaviour. In the
+ The fencing is set to resource-only enables this behaviour. In the
resource-only case the outdate-peer handler should have a return
value of 3, 4, 5 or 6, but should not return 7.
@@ -208,13 +208,13 @@
When the outdate-peer handler returns IO is resumed.
- Notes:
+ Notes:
* Why do we need to freeze IO in the "resource-and-stonith" case:
Stonith protects you when all communication pathes fail. In
that case both (isolated) nodes try to stonith each other.
If the current primary would continue to allow IO it could
- accept transactions, but could get stonithed by the
- currently secondary node.
+ accept transactions, but could get stonithed by the
+ currently secondary node.
-> Therefore others could see commited transactions that
would be gone after the successfull stonith operation.
@@ -234,25 +234,25 @@
8 New command drbdmeta
- We move the read_gc.pl/write_gc.pl to the user directory.
+ We move the read_gc.pl/write_gc.pl to the user directory.
Make them to one C program: drbdmeta
-> in the future the module never creates the meta data
- block. One can use drbdmeta to create, read and
+ block. One can use drbdmeta to create, read and
modify the drbdmeta block. drbdmeta refuses to write
to it as long as the module is loaded (configured).
drbdsetup gets the ability to read the gc values while DRBD
is set up via an ioctl() call. -- drbdmeta refuses to run
- if DRBD is configured.
+ if DRBD is configured.
- drbdadm is the nice front end. It always uses the right
+ drbdadm is the nice front end. It always uses the right
back end (drbdmeta or drbdsetup)...
drbdadm set-gi 1:2:3:4:5:6 r0
drbdadm get-gi r0
drbdadm md-create r0
- md-create would ask nasty questions about whether you are really
+ md-create would ask nasty questions about whether you are really
sure and so on, and do some plausibility checks first.
md-set would be undocumented and for wizards only.
80% DONE
@@ -276,21 +276,21 @@
[ Description of GFS-mode-arbitration2.pdf ]
1. Basic mirroring with protocol C.
- The file system on N2 issues a write request towards DRBD,
+ The file system on N2 issues a write request towards DRBD,
which is written to the local disk and sent to N1. Then
the data bock is written to the local disk here and and
acknowledge packet is sent back. As soon as both the
- write to the local disk and the ACK from N1 reach N2,
+ write to the local disk and the ACK from N1 reach N2,
DRBD signals the completion of IO to the file system.
The major pitfall is the handling of concurrent writes to the
- same block. (Concurrent writes to the same blocks should not
+ same block. (Concurrent writes to the same blocks should not
happen, but we have to assume that it is possible that the
- synchronisation methods of our upper layer [i.e. openGFS]
+ synchronisation methods of our upper layer [i.e. openGFS]
may fail.)
There are many cases in which such concurrent writes would
- lead to different data on our two copies of the block.
+ lead to different data on our two copies of the block.
*** FIXME ***
description of algorithm here is out of date,
@@ -302,13 +302,13 @@
ends with having the green version (=data from FS on N1).
The solution is to flag one node (in the example N2 has the
discard-concurrent-writes-flag).
- As we can see on the right side, now both nodes ends with
+ As we can see on the right side, now both nodes ends with
the blue data.
3. Concurrent writes, high latency for data packets.
The problem now is that N2 does can not detect that this was
a concurrent write, since it got the ACK before the conflicting
- data packets comes in.
+ data packets comes in.
This can happens since in DRBD, data packets and ACK packets are
transmitted via two independent TCP connections, therefore the
ACK packet can overtakes a data packet.
@@ -320,25 +320,25 @@
4. Concurrent writes, high latency for data packets.
This is the inverse case to case3 and already handled by the means
- introduced with item 1.
+ introduced with item 1.
5. New write while processing a write from the peer.
- Without further measures this would lead to an inconsistency in
- our mirror as the figure on the left side shows.
+ Without further measures this would lead to an inconsistency in
+ our mirror as the figure on the left side shows.
If we currently write a conflicting block from the peer, we simply
- discard the write request from our FS and signal IO completion
+ discard the write request from our FS and signal IO completion
immediately.
6. High disk latency on N2.
- By IO reordering in the layers below us this could lead to
- having the blue data on N2 and the green data on N1.
+ By IO reordering in the layers below us this could lead to
+ having the blue data on N2 and the green data on N1.
The solution to this case is the delay the write to the local
disk on N2 until the local write is done. This is different from
case two since we already got the write ACK to the conflicting
block.
7. An data packet overtakes an ACK packet on the network.
- Although this case is quite unlikely, we have to take int into
+ Although this case is quite unlikely, we have to take int into
account. From N2's point of fiew this looks a lot like case 4,
but N2 should not delete the data packet now!
@@ -348,11 +348,11 @@
accept() in the drbd_connect() function) and mark it withe the
discard-concurrent-writes-flag.
- Each data packet and each ACK packet gets a sequence
- number, which is increased which every packet sent.
+ Each data packet and each ACK packet gets a sequence
+ number, which is increased which every packet sent.
(This is a common space of sequence numbers)
- The algorithm which is performed upon the reception of a
+ The algorithm which is performed upon the reception of a
data packet [drbd_receiver].
* If the sequence number of the data packet is higher than
@@ -360,12 +360,12 @@
[needed to satisfy example case 7]
1. If the packet's sequence number is on the discard list,
- simply drop it.
+ simply drop it.
[ ex.c. 3]
2. Do we have a concurrent request? (i.e. Do I have a request
to the same block in my transfer log.) If not -> write now.
[ default ]
- 3. Have I already got an ACK packet for the concurrent
+ 3. Have I already got an ACK packet for the concurrent
request ? (Has the request the RQ_DRBD_SENT bit already set)
If yes -> write the data from the data packet afterwards.
[ ex.c. 6]
@@ -378,12 +378,12 @@
packet.
[ ex.c. *]
- The algorithm which is performed upon the reception of an
+ The algorithm which is performed upon the reception of an
ACK packet [drbd_asender]
* If we get an ACK, store the sequence number in last_seq.
- The algorithm which is performed upon the reception of an
+ The algorithm which is performed upon the reception of an
discard info packet [drbd_asender]
* if the current last_seq is lower the the packet that should
@@ -401,7 +401,7 @@
99% DONE
10 Change Sync-groups to sync-after
-
+
Sync groups turned out to be hard to configure and more
complex setups, hard to implement right and last not least they
are not flexible enough to cover all real world scenarios.
@@ -409,9 +409,9 @@
E.g. Two physical disks should be mirrored with DRBD. On one
of the disks there is only a single partition, while the
other one is divided into many (e.g. 4 smaller) partitions.
- One would want to sync the big one in parallel to the
+ One would want to sync the big one in parallel to the
4 small ones. While the resync process of the 4 small
- ones need to be serialized.
+ ones need to be serialized.
-> With the current sync groups you can not express
this requirement.
@@ -420,15 +420,15 @@
99% DONE
Finished the implementation. Tested.
-11 Take into account that the two systems could have different
- PAGE_SIZE.
+11 Take into account that the two systems could have different
+ PAGE_SIZE.
At least we should negotiate the PAGE_SIZE used by the peers,
and use it. In case the PAGE_SIZE is not the same inform
the user about the fact.
Probably a general high performance implementation for this
- issue is not necessary, since clusters of machines with
+ issue is not necessary, since clusters of machines with
different PAGE_SIZE are of academic interest only.
100% DONE by item 15
@@ -439,8 +439,8 @@
99% DONE
13 Introduce an UUID (universally unique identifier) in the
- meta data. One purpose is to tag the bitmap with this UUID.
- If the peer's UUID is different to what we expect we know that
+ meta data. One purpose is to tag the bitmap with this UUID.
+ If the peer's UUID is different to what we expect we know that
we have to do a full sync....
99% DONE
-> Will be go out again, and become replaced by UUID for data
@@ -454,14 +454,14 @@
The new interface is now based on netlink (actually connector).
It is based on the concept of tag lists. The idea is that on the
interface we pass lists (actually arrays) of tags. Where each
- tag identifies the following sniplet of data.
+ tag identifies the following sniplet of data.
Each tag also states if it is mandatory.
In case we have to add a new value to the interface, the
existing userland tools continue to work with newer kernel
modules and vice versa. (Only the older part of the two will
inform the user with a warning, that there was a unknown
- tag on the interface, and that the unknown tag got ignored)
+ tag on the interface, and that the unknown tag got ignored)
But the basic functionality stays intact!
While implementing this, we also implemented dynamic device allocation.
@@ -473,40 +473,40 @@
--set-defaults ____ set all not mentioned options to it's default values.
Things to do:
-
+
* Locking in userspace, to prevent multiple instances of drbdsetup
* Think about locking in kernel space ( device_mutex? )
80% DONE
-15 Accept BIOs bigger than one page, probabely up to 32k (8 pages)
+15 Accept BIOs bigger than one page, probabely up to 32k (8 pages)
currently.
* Normal Requsts. -> DONE
* Make the syncer to commulate adjacent bits into bigger requests. -> DONE
* Make the bitmap more coarse grained. -> TODO
66% DONE
-16 Displace the current generation-counters with a data-generation-UUID
+16 Displace the current generation-counters with a data-generation-UUID
concept.
The current generation counters have various weaknesses:
* In a split braine'd cluster the appliance of the same events
to both cluster nodes could lead to equal generation-counters
on both nodes, while the data is not in sync for sure.
- * They are completely unsuitable if a 3rd node is used for
+ * They are completely unsuitable if a 3rd node is used for
e.g. weekly snapshots.
* Gracefull takeover while disconnected not possible.
We associate each data generation with an unique UUID (=64 bit random
- number). A new data generation is created if a primary node is
- disconnected from its secondary and when a degraded secondary
+ number). A new data generation is created if a primary node is
+ disconnected from its secondary and when a degraded secondary
becomes primary for the first time.
- In the meta-data we store a few generations-UUIDs:
+ In the meta-data we store a few generations-UUIDs:
* current
* bitmap
* history[2]
- As well as the currently known flags:
+ As well as the currently known flags:
Consistent, WasUpToDate, LastState, ConnectedInd, WantFullSync
When the cluster is in Connected state, then the bitmpat gen-UUID
@@ -562,11 +562,11 @@
When the bitmap-UUID gets cleared, move the previous value to H1.
In case H1 was already set copy its previous value to H2. Etc..
- For the auto recover strategies after split brain (see item 5)
+ For the auto recover strategies after split brain (see item 5)
it is neccessary to embedd the node's role into the UUIDs.
This is masked out of course when the UUIDs are compared.
- * Note1: Discontinue the --human and --timout options when
+ * Note1: Discontinue the --human and --timout options when
becoming primary.
NB: If they are needed, I think they can be implemented
as special UUID values.
@@ -583,7 +583,7 @@
drbdx: WARNING disk sizes more than 10% different
would be nice at (initial) full sync.
- drbdx: WARNING disk sizes more than 10% different
+ drbdx: WARNING disk sizes more than 10% different
18 Connection-Teardown Packet. Currently the new state-checks
disallows "drbdadm disconnect res" on the primary node of a
@@ -613,7 +613,7 @@
In the BIO layer this is BIO_RW_BARRIER, which is usually set on
BIO_RW (=write) requests.
- The REQ_HARDBARRIER bit is currently used to do a cache flush on
+ The REQ_HARDBARRIER bit is currently used to do a cache flush on
IDE devices. Actually not all IDE devices can do cache flushes, there
are some older models out there that can do write-caching but can
not perform a cache flush!
@@ -631,21 +631,21 @@
Default ist QUEUE_ORDERED_NONE. This is the reason why we never see
the REQ_HARDBARRIER flag currently.
- An other consequence of this is, that IDE devices that do _not_ support
+ An other consequence of this is, that IDE devices that do _not_ support
cache flushes and have write cache enabled are inherent buggy to use with
a journaled file system.
SCSI's Tagged queuing (seems to be presenet in SATA as well)
[excerpt from http://www.scsimechanic.com/scsi/SCSI2-07.html]
- Tagged queuing allows a target to accept multiple I/O processes from
- the same or different initiators until the logical unit's command queue
+ Tagged queuing allows a target to accept multiple I/O processes from
+ the same or different initiators until the logical unit's command queue
is full.
If only SIMPLE QUEUE TAG messages are used, the target may execute the
commands in any order that is deemed desirable within the constraints
of the queue management algorithm specified in the control mode page
- (see 8.3.3.1).
+ (see 8.3.3.1).
If ORDERED QUEUE TAG messages are used, the target shall execute the
commands in the order received with respect to other commands received
@@ -655,7 +655,7 @@
command with the ORDERED QUEUE TAG message. All commands received with
a SIMPLE QUEUE TAG message after a command received with an ORDERED
QUEUE TAG message, regardless of initiator, shall be executed after
- that command with the ORDERED QUEUE TAG message.
+ that command with the ORDERED QUEUE TAG message.
A command received with a HEAD OF QUEUE TAG message is placed first in
the queue, to be executed next. A command received with a HEAD OF
@@ -664,7 +664,7 @@
are executed in a last- in-first-out order.
I think in the context of SCSI the kernel usually issues write requests
- with the SIMPLE QUEUE TAG, and requests with the REQ_HARDBARRIER
+ with the SIMPLE QUEUE TAG, and requests with the REQ_HARDBARRIER
(i.e. bio's with the BIO_RW_BARRIER) with an ORDERED QUEUE TAG.
What QUEUE_ORDERED_ type should we expose ?
@@ -694,17 +694,17 @@
have to stay with the current code.
In case our backing device only supports QUEUE_ORDERED_FLUSH we
- will to use the current code. That means, when we receive a write
+ will to use the current code. That means, when we receive a write
barrier packet we wait until all of our pending local write
requests are done. (This potentially causes congestion on the TCP
socket...)
- In cause our backing device's queue properties are set to
+ In cause our backing device's queue properties are set to
QUEUE_ORDERED_TAG we offload the complete barrier logic to the
backing storage device:
* When we receive a barrier packet
- - If we have no local pending requests, we send the barrier ACK
+ - If we have no local pending requests, we send the barrier ACK
immediately. (= current code)
- If the last_barrier_write member of mdev points to an epoch_entry
we set bit 31 of bnum.
@@ -724,15 +724,15 @@
90% DONE [ Not tested yet. ]
-22 Reboot notifier.
+22 Reboot notifier.
-23 External imposed SyncPause states.
+23 External imposed SyncPause states.
There are two new commands: 'drbdadm pause-sync res'
'drbdadm resume-sync res'
These may be used to suspend the resynchronisation process while
e.g. the backing storages' raid controller does its resynchronisation.
- While implementing this, I also made shure that in a 3 node
+ While implementing this, I also made shure that in a 3 node
setup the two peers of a connection will agree if a resynchronisation
is paused under all conditions you can think of, if there are more
than two nodes!
@@ -748,13 +748,13 @@
99% DONE
-26 Implement a kind of "dstate" command to make integration with
+26 Implement a kind of "dstate" command to make integration with
Heartbeat-2.0's master/slave-support possible.
99% DONE
27 Remove all explicit drbd_md_write() calls, and create a mechanism,
- that always keeps the on disk-metadata up-to-date implicit.
+ that always keeps the on disk-metadata up-to-date implicit.
Calling drbd_md_write() explicit is too errorprone.
99% DONE
@@ -785,13 +785,13 @@
32 drbdmeta: with internal meta-data v07 and v08 meta-data super blocks
are in different places. -> It is possible to have v07 AND v08 meta
- data on one device.
+ data on one device.
=> drbdmeta should make sure that it overwrites the other location
in case it create a meta-data block.
99% DONE
-33 Serialize state changes like secondary -> primary and
+33 Serialize state changes like secondary -> primary and
Connected -> SyncSource in the cluster.
role <- primary
@@ -800,7 +800,7 @@
disk <- Diskless (as long as it happens as administrative command)
pdsk <- Outdated (= a 'disconnect' issued on a primary node)
- * When a state change might sleep ( reuqest_state() ) and it is
+ * When a state change might sleep ( reuqest_state() ) and it is
to be cluster wide atomic ( pre_state_checks() determines this!).
1. Aquire the cluster state change lock (bit & waitqueue) ?
2. We send a request_state packet.
@@ -813,10 +813,10 @@
* When we are not UNIQUE we try to apply the state change
immediately (without taking the cluster lock).
2. We send the ACK / NACK.
- ( Do we actually need an ACK/NACK ?
+ ( Do we actually need an ACK/NACK ?
* On the not UNIQUE side, we will fail the request as
soon as the offending state request comes in.
- * On the UNIQUE side we need to positive ACK to
+ * On the UNIQUE side we need to positive ACK to
continue.
) I guess for the sake of completeness, we should
have both packets, although currently the need for
@@ -830,7 +830,7 @@
change happens while a cluster wide state change goes on), we
need to re-evaluate the pre state change check. In case the
pre state change check allows the new state we can procees,
- otherwise we need to fail the request.
+ otherwise we need to fail the request.
* How to do the synchronisation form the receive of the ACK / NACK
packet to the termination of the request_state() function ?
@@ -842,11 +842,11 @@
* A CL_ST_CHG_FAIL bit set by the receiver.
* A wait queue.
- TODOS:
+ TODOS:
Evaluate if it is possible to use it for starting resync. (invalidate)
Evaluate it for the other cases...
- 90 % Is implemented. Changing the role to primary already uses this
+ 90 % Is implemented. Changing the role to primary already uses this
mechanism. Starting resync with invalidate and invalidate_remote
now also uses this method. Detaching now also uses this mechanism.
@@ -860,32 +860,32 @@
36 Increase the number of UUID history slots.
37 In case heartbeat (or some one else) makes us primary, we need to
- check first if the peer is alive.
- Currently we habe a problem is when heartbeat's dead time is smaller
+ check first if the peer is alive.
+ Currently we habe a problem is when heartbeat's dead time is smaller
than DRBD's network timeout.
38 Create an other on-io-error hander, that does retry failed read
operations on the peer, but does not detach from the local disk.
And it sets that block in the bitmap as out-of-date.
- Simon works on this.
+ Simon works on this.
39 Send mirrored write requests out of the worker context.
99% DONE
40 Do something with FLUSHBUFS ioctl.
-41 Fix DRBD's behaviour in case of a common power failuer and when
+41 Fix DRBD's behaviour in case of a common power failuer and when
both nodes were in primary role.
See the the Algorithm of Item 16, section 4 to 4.4 .
- Further we need to have the resync rolces conflict "rr-conflict"
+ Further we need to have the resync rolces conflict "rr-conflict"
strategy option with the following values:
The available options are:
"disconnect" ... No automatic resynchronisation, simply disconnect.
- "violently" .... Sync to the primary node is allowed, violating the
+ "violently" .... Sync to the primary node is allowed, violating the
assumption that data on a block device is stable
for one of the nodes. DANGEROUS, DO NOT USE.
"call-pri-lost"
@@ -908,10 +908,10 @@
Maybe:
-* Switch to protocol C in case we are running without a local
+* Switch to protocol C in case we are running without a local
disk and are configured to use protocol A or B.
-* Dynamic misc char device instead of IOCTLs for configuration. Evaluate
+* Dynamic misc char device instead of IOCTLs for configuration. Evaluate
if the configuration could be done over a netlink socket as well...
* A netlink socket to communicate events to userspace.
@@ -936,6 +936,6 @@
a DRBD pair). Enhance the user level tools to support the 3 node
setup.
-5 Have protocol version 74 available in drbd-0.8, to allow rolling
+5 Have protocol version 74 available in drbd-0.8, to allow rolling
upgrades
Modified: trunk/benchmark/Makefile
===================================================================
--- trunk/benchmark/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/benchmark/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -4,7 +4,7 @@
install:
-clean:
+clean:
rm -f dm
distclean: clean
Modified: trunk/benchmark/dm.c
===================================================================
--- trunk/benchmark/dm.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/benchmark/dm.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,11 +1,9 @@
/*
dm.c
- By Philipp Reisner.
+ Copright 2001-2007 LINBIT Information Technologies
+ Philipp Reisner, Lars Ellenberg
- Copyright (C) 1999-2003, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
-
dm 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)
Deleted: trunk/benchmark/report_to_html.pl
===================================================================
--- trunk/benchmark/report_to_html.pl 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/benchmark/report_to_html.pl 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,121 +0,0 @@
-#!/usr/bin/perl
-
-sub readdrbd
-{
- my $nr = shift;
- my $prot,$val,$i;
- $line = <STDIN>;
- $line = <STDIN>;
-
- for ($i=0;$i<3;$i++)
- {
- $line = <STDIN>;
- ($prot, $val) =
- ($line =~ /^ Protocol (.)\: ([0-9\.]+)/);
- $drbd{$prot}[$nr] = $val;
- }
-}
-
-sub readnetwork
-{
- $line = <STDIN>;
- $line = <STDIN>;
-
- $line = <STDIN>;
- ($bandwidth) =
- ($line =~ /^ Bandwidth\: ([0-9\.]+)/);
-
- $line = <STDIN>;
- ($latency) =
- ($line =~ / Latency\: round-trip min\/avg\/max = ([0-9\.\/]+) ms/);
-}
-
-sub readnode
-{
- my $nr = shift;
- $line = <STDIN>;
- $line = <STDIN>;
-
- $line = <STDIN>;
- ($os[$nr], $rev[$nr], $arch[$nr]) =
- ($line =~ /^ ([a-zA-Z0-9\-\.]+) ([a-zA-Z0-9\-\.]+) ([a-zA-Z0-9\-\.]+)/);
-
- $line = <STDIN>;
- ($mips[$nr]) =
- ($line =~ /^ [Bb][Oo][Gg][Oo][Mm][Ii][Pp][Ss]\s+\:\s+([0-9\.]+)/);
-
- $line = <STDIN>;
- ($disk[$nr]) =
- ($line =~ /^ Disk write\: ([0-9\.]+)/);
-
- $line = <STDIN>;
- ($unconn[$nr]) =
- ($line =~ /^ Drbd unconnected\: ([0-9\.]+)/);
-}
-
-sub printtable
-{
- my $i;
-
- printf("<table BGCOLOR=#a0a0a0>\n");
- printf(" <tr><td>\n");
- printf(" <table BGCOLOR=#d3d3d3 CELLPADDING=2 width=100%>\n");
- printf(" <tr><th>Network bandwidth</th><th>Network latency ");
- printf("(min/avg/max)</th><th>Setsize</th><th>Drbd rev.</th></tr>\n");
- printf(" <tr><td>$bandwidth MB/s</td><td>$latency ms</td> ");
- printf("<td>$setsize</td><td>$drbd_rev</td></tr>\n");
- printf(" </table>\n");
- printf(" <table BGCOLOR=#d3d3d3 CELLPADDING=2>\n");
- printf(" <tr><td></td><th>OS</th><th>Rev.</th><th>Arch</th> ");
- printf("<th>BogoMips</th><th>Disk write</th><th>Drbd uncon.</th> ");
- printf("<th>Prot. A</th><th>Prot. B </th><th>Prot. C</th></tr>\n");
- for($i=1;$i<3;$i++)
- {
- printf(" ");
- printf("<tr><th>Node$i</th><td>$os[$i]</td><td>$rev[$i]</td>");
- printf("<td>$arch[$i]</td><td>$mips[$i]</td><td>$disk[$i] MB/s</td>");
- printf("<td>$unconn[$i] MB/s</td><td>$drbd{A}[$i] MB/s</td>");
- printf("<td>$drbd{B}[$i] MB/s</td><td>$drbd{C}[$i] MB/s</td></tr>\n");
- }
- printf(" </table>\n");
- printf(" </td></tr>\n");
- printf("</table>\n");
-}
-
-
-#
-# main()
-#
-
-$line="";
-
-while($line = <STDIN>)
-{
- if( $line eq "DRBD Benchmark\n")
- {
- $line = <STDIN>;
-
- ($is_there,$drbd_rev) = ($line =~ /^ (Version:) ([0-9\.]+)/);
- if($is_there eq "Version:")
- {
- $line = <STDIN>;
- }
- else
- {
- $drbd_rev = "0.5.3";
- }
- ($setsize) = ($line =~ /^ ?SETSIZE = ([0-9]+[KMG])/);
-
- readnode(1);
- readnode(2);
- readnetwork;
- readdrbd(1);
- readdrbd(2);
- printtable;
- }
-}
-
-
-
-
-
Deleted: trunk/benchmark/run.sh
===================================================================
--- trunk/benchmark/run.sh 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/benchmark/run.sh 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,227 +0,0 @@
-#!/bin/sh
-
-echo
-echo "Automatic DRBD performance measuring script."
-echo "--------------------------------------------"
-echo
-
-echo "
- Needs to be reviewed
- is untouched since at least the 0.6 days
- does not work with 0.7 currently
-"
-exit 1
-
-if [ -e config ];
- then source config;
-else
- echo "We need to write a config file first. You will have to answer"
- echo "6 questions about your setup."
- echo
- echo "* You need to run this script as root."
- echo "*"
- echo "* This script needs to make rsh connections to your second node,"
- echo "* without using a passwort!"
- echo "*"
- echo "* You can setup this by doing this on node2:"
- echo "* 'ALL: node1' in /etc/hosts.allow"
- echo "* 'shell stream ..... in.rshd' in /etc/inetd.conf"
- echo "* 'node1' in /root/.rhosts"
- echo
- echo "What is the name of your (local) machine (or IP address of the"
- echo "interface you want to use) ? "
- read L_NODE
- echo "What is the name of your remote machine (or IP address of the"
- echo "interface you want to use) ? "
- read R_NODE
- echo "Which disk device you want to use on your (local) machine? (/dev/xyz) "
- read LL_DEV
- echo "Which disk device you want to use on your remote machine? (/dev/xyz) "
- read RL_DEV
- echo "Where is the source directory on the remote machine? (/home/xy/drbd/) "
- read R_DRBD_DIR
- echo "Size for write preformance tests? (If you do not know enter '10M') "
- read SETSIZE
- echo
- echo "Is everything correct? [y/n] "
- read CORR
- if [ $CORR = "Y" -o $CORR = "y" ];
- then
- echo "L_NODE=$L_NODE" >config
- echo "LL_DEV=$LL_DEV" >>config
- echo "R_NODE=$R_NODE" >>config
- echo "RL_DEV=$RL_DEV" >>config
- echo "R_DRBD_DIR=$R_DRBD_DIR" >>config
- echo "SETSIZE=$SETSIZE" >>config;
- fi
- exec ./run.sh;
-fi
-
-echo " !!! WARNING !!!"
-echo
-echo "This test will destroy the following partitions:"
-echo " $L_NODE::$LL_DEV"
-echo " $R_NODE::$RL_DEV"
-echo "After the test is run, you will need to run mkfs on these"
-echo "partitions in order to use them again."
-echo
-echo "PLEASE MAKE SURE YOU HAVE BACKED UP ANY DATA YOU NEED FROM"
-echo "THESE PARTITIONS!"
-echo
-echo "Continue (and destroy these partitions) ? [y/n] "
-read CONT
-if [ $CONT != "Y" -a $CONT != "y" ];
- then exit 0;
-fi
-
-#---
-INSMOD=/sbin/insmod
-RMMOD=/sbin/rmmod
-RSH=rsh
-#---
-PROTOCOLS="A B C"
-DRBDSETUP=../user/drbdsetup
-RDRBDSETUP=$R_DRBD_DIR"user/drbdsetup"
-DM=./dm
-RDM=$R_DRBD_DIR"benchmark/dm"
-MODULE=../drbd/drbd.o
-RMODULE=$R_DRBD_DIR"drbd/drbd.o"
-OPTIONS="-t 50"
-
-unset LC_ALL
-unset LANG
-unset LINGUAS
-
-$RMMOD drbd 2> /dev/zero
-$RSH $R_NODE $RMMOD drbd 2> /dev/zero
-
-echo -n -e "DRBD Benchmark\n " > report
-$DRBDSETUP 2>&1 | grep Version | sed -e "s/\ //g" >>report
-echo " SETSIZE = $SETSIZE" >>report
-echo >>report
-
-##
-# LOCAL DISK
-##
-echo -n -e "Node1:\n " >>report
-uname -s -r -m >>report
-echo -n " " >>report
-grep -i BogoMIPS /proc/cpuinfo >>report
-echo "local disk"
-echo -n " Disk write: " >>report
-$DM -i /dev/zero -o $LL_DEV -s $SETSIZE -y -p >>report
-echo -n " Drbd unconnected: " >>report
-rm -f /var/lib/drbd/drbd*
-$INSMOD $MODULE
-$DRBDSETUP /dev/nb0 disk $LL_DEV -d $SETSIZE
-$DRBDSETUP /dev/nb0 net $L_NODE $R_NODE A
-$DRBDSETUP /dev/nb0 primary
-$DM -i /dev/zero -o /dev/nb0 -s $SETSIZE -y -p >>report
-$RMMOD drbd
-echo >>report
-
-##
-# REMOTE DISK
-##
-echo -n -e "Node2:\n " >>report
-$RSH $R_NODE uname -s -r -m >>report
-echo -n " " >>report
-$RSH $R_NODE grep -i BogoMIPS /proc/cpuinfo >>report
-echo "remote disk"
-echo -n " Disk write: " >>report
-$RSH $R_NODE $RDM -i /dev/zero -o $RL_DEV -s $SETSIZE -y -p >>report
-echo -n " Drbd unconnected: " >>report
-$RSH $R_NODE rm -f /var/lib/drbd/drbd*
-$RSH $R_NODE $INSMOD $RMODULE
-$RSH $R_NODE $RDRBDSETUP /dev/nb0 disk $RL_DEV -d $SETSIZE
-$RSH $R_NODE $RDRBDSETUP /dev/nb0 net $R_NODE $L_NODE A
-$RSH $R_NODE $RDRBDSETUP /dev/nb0 primary
-$RSH $R_NODE $RDM -i /dev/zero -o /dev/nb0 -s $SETSIZE -y -p >>report
-$RSH $R_NODE $RMMOD drbd
-echo >>report
-
-##
-# NETWORK
-##
-echo "network"
-echo "Network: " >>report
-echo -n " Bandwidth: " >>report
-$RSH $R_NODE $RDM -i /dev/zero -s $SETSIZE | $DM -o /dev/null -p >>report
-echo -n " Latency: " >>report
-ping -c 50 -f $R_NODE | grep round-trip >>report
-
-echo -e "\nDrbd connected (writing on node1):" >>report
-for PROT in $PROTOCOLS; do
- echo -n "Pr"
- rm -f /var/lib/drbd/drbd*
- $INSMOD $MODULE
- $RSH $R_NODE rm -f /var/lib/drbd/drbd*
- $RSH $R_NODE $INSMOD $RMODULE
- echo -n "o"
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 disk $RL_DEV
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 net $R_NODE $L_NODE $PROT -k
- $DRBDSETUP /dev/nb0 disk $LL_DEV
- $DRBDSETUP /dev/nb0 net $L_NODE $R_NODE $PROT -k
- $DRBDSETUP /dev/nb0 wait_connect $OPTIONS
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 wait_connect $OPTIONS
-
- echo -n "t"
-
- sleep 2
-
- $DRBDSETUP /dev/nb0 primary
-
- echo "ocol $PROT"
-
- echo -n " Protocol $PROT: " >>report
- $DM -i /dev/zero -o /dev/nb0 -s $SETSIZE -y -p >>report
-
- sleep 1
-
- $RMMOD drbd
- $RSH $R_NODE $RMMOD drbd
- sleep 1;
-done
-
-echo -e "\nDrbd connected (writing on node2):" >>report
-for PROT in $PROTOCOLS; do
- echo -n "Pr"
- rm -f /var/lib/drbd/drbd*
- $INSMOD $MODULE
- $RSH $R_NODE rm -f /var/lib/drbd/drbd*
- $RSH $R_NODE $INSMOD $RMODULE
- echo -n "o"
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 disk $RL_DEV
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 net $R_NODE $L_NODE $PROT -k
- $DRBDSETUP /dev/nb0 disk $LL_DEV
- $DRBDSETUP /dev/nb0 net $L_NODE $R_NODE $PROT -k
- $DRBDSETUP /dev/nb0 wait_connect $OPTIONS
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 wait_connect $OPTIONS
- echo -n "t"
-
- sleep 2
-
- $RSH $R_NODE $RDRBDSETUP /dev/nb0 primary
-
- echo "ocol $PROT"
-
- echo -n " Protocol $PROT: " >>report
- $RSH $R_NODE $RDM -i /dev/zero -o /dev/nb0 -s $SETSIZE -y -p >>report
-
- sleep 1
-
- $RMMOD drbd
- $RSH $R_NODE $RMMOD drbd
- rm -f /var/lib/drbd/drbd*
- $RSH $R_NODE rm -f /var/lib/drbd/drbd*
-
- sleep 1;
-done
-
-echo "--------------- report --------------"
-cat report
-echo "-------------------------------------"
-echo "Please send the report file to philipp.reisner at linbit.com."
-echo " Thank you."
-echo
-echo "PS: Do not forget to disable rsh again."
Modified: trunk/debian/copyright
===================================================================
--- trunk/debian/copyright 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/debian/copyright 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,18 +3,19 @@
upstream.
Debianization of this package was started by Ard van Breemen <ard at telegraafnet.nl>.
-Later, Jan Niehusmann <jan at debian.org> finished the packaging and made the
+Later, Jan Niehusmann <jan at debian.org> finished the packaging and made the
initial upload.
-It was downloaded from http://www.linbit.com/en/article/articleview/34/1/11/
+It was downloaded from http://oss.linbit.com/drbd/
More information can be found at http://www.drbd.org/
-Drbd is free software; you can redistribute them and/or modify them under
-the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 2 of the License, or (at your option) any later
+DRBD was written by Philipp Reisner and Lars Ellenberg
+for LINBIT Information Technologies, http://www.linbit.com
+
+Drbd is free software; you can redistribute them and/or modify them under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
version.
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.
-
-
Modified: trunk/debian/drbd8-utils.postinst
===================================================================
--- trunk/debian/drbd8-utils.postinst 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/debian/drbd8-utils.postinst 2007-01-16 18:51:07 UTC (rev 2702)
@@ -7,8 +7,8 @@
# Make sure /dev/nb[0-7] devices exist
# cd /dev; for a in `seq 0 7`; do MAKEDEV nb$a; done
-for i in `seq 0 15` ; do
- test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
+for i in `seq 0 15` ; do
+ test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
done
#DEBHELPER#
Modified: trunk/documentation/Makefile
===================================================================
--- trunk/documentation/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
# Makefile in documentation directory
#
-# This file is part of drbd by Philipp Reisner
+# This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
#
# drbd is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,9 +46,9 @@
nsgmls "$$in" |\
sgmlspl /usr/share/sgml/docbook/utils-0.6.6/helpers/docbook2man-spec.pl;\
}; _db2man
-
+
# dockbook2html produces errors and swallows tables.
- # db2html works, but in contrast do dockbook2man creates
+ # db2html works, but in contrast do dockbook2man creates
# a subdirectory and some extra files ...
# this works for me:
DB2HTML :=\
@@ -85,10 +85,10 @@
mv index.html $@
.sgml.pdf:
- $(DB2PDF) $<
+ $(DB2PDF) $<
.sgml.ps:
- $(DB2PS) $<
+ $(DB2PS) $<
gzip -c $@ > $@.gz
#######
@@ -128,7 +128,7 @@
# @ set -e; for i in $(LANGS); do ln -sf ../Makefile.lang $$i/Makefile; done
man: $(MANPAGES)
- @ set -e; for i in $(LANGS); do $(MAKE) -C $$i man; done
+ @ set -e; for i in $(LANGS); do $(MAKE) -C $$i man; done
install:
@ok=true; for f in $(MANPAGES) ; \
@@ -147,11 +147,11 @@
done
@ set -e; for i in $(LANGS); do $(MAKE) -C $$i uninstall; done
-html: prepare $(shell ls *.sgml | sed s/sgml/html/g)
- @ set -e; for i in $(LANGS); do $(MAKE) -C $$i html; done
+html: prepare $(shell ls *.sgml | sed s/sgml/html/g)
+ @ set -e; for i in $(LANGS); do $(MAKE) -C $$i html; done
pdf: prepare $(shell ls *.sgml | sed s/sgml/pdf/g)
- @ set -e; for i in $(LANGS); do $(MAKE) -C $$i pdf; done
+ @ set -e; for i in $(LANGS); do $(MAKE) -C $$i pdf; done
ps: prepare $(shell ls *.sgml | sed s/sgml/ps/g)
- @ set -e; for i in $(LANGS); do $(MAKE) -C $$i ps; done
+ @ set -e; for i in $(LANGS); do $(MAKE) -C $$i ps; done
Modified: trunk/documentation/Makefile.lang
===================================================================
--- trunk/documentation/Makefile.lang 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/Makefile.lang 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
# Makefile in documentation directory
#
-# This file is part of drbd by Philipp Reisner
+# This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
#
# drbd is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Modified: trunk/documentation/drbd.conf.sgml
===================================================================
--- trunk/documentation/drbd.conf.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbd.conf.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -23,7 +23,7 @@
a verbatim copy of the file on both nodes of the cluster.
It is highly recommended to do so in order to keep your configuration
manageable. The file <option>/etc/drbd.conf</option> should be the same on both nodes of the cluster. Changes to <option>/etc/drbd.conf</option> do not apply
- immediately.
+ immediately.
<example>
<title>A small drbd.conf file</title>
<programlisting>
@@ -31,9 +31,9 @@
common { syncer { rate 10M; } }
resource r0 {
protocol C;
- net {
- cram-hmac-alg sha1;
- shared-secret "FooFunFactory";
+ net {
+ cram-hmac-alg sha1;
+ shared-secret "FooFunFactory";
}
on thost1 {
device /dev/drbd1;
@@ -57,7 +57,7 @@
<replaceable>/dev/drbd1</replaceable> as devices for its application, and
<replaceable>/dev/hda7</replaceable> as low level storage for the data.
The IP addresses are used to specify the networking interfaces to use.
- An eventually running resyncprocess should use about 10MByte/second of IO
+ An eventually running resyncprocess should use about 10MByte/second of IO
bandwith.
</para>
<para>
@@ -173,7 +173,7 @@
This section is used to fine tune DRBD's properties
in respect to the low level storage. Please
refer to <citerefentry><refentrytitle>drbdsetup</refentrytitle>
- <manvolnum>8</manvolnum></citerefentry> for detailed description of
+ <manvolnum>8</manvolnum></citerefentry> for detailed description of
the parameters.
Optional parameter: <option>on-io-error</option>,
<option>size</option>, <option>fencing</option>, <option>use-bmbv</option>.
@@ -234,7 +234,7 @@
In this section can define handlers (executables) that are executed
by the DRBD system in response to certain events.
Optional parameters:
- <option>pri-on-incon-degr</option>, <option>pri-lost-after-sb</option>,
+ <option>pri-on-incon-degr</option>, <option>pri-lost-after-sb</option>,
<option>pri-lost</option>, <option>outdate-peer</option>,
<option>local-io-error</option>.
</para>
@@ -255,10 +255,10 @@
<replaceable>count</replaceable> may be a number from 1 to 255.
</para>
<para>Use <replaceable>minor-count</replaceable>
- if you want to define massively more resources later without reloading
+ if you want to define massively more resources later without reloading
the DRBD kernel
module. Per default the module loads with 11 more than you have currently
- in your config but at least 32.
+ in your config but at least 32.
</listitem>
</varlistentry>
@@ -267,8 +267,8 @@
<listitem><para>
<replaceable>time</replaceable> may be 0 or a positive number.
</para>
- <para>The user dialog redraws the second count every
- <replaceable>time</replaceable> seconds (or does no redraws if
+ <para>The user dialog redraws the second count every
+ <replaceable>time</replaceable> seconds (or does no redraws if
<replaceable>time</replaceable> is zero). The default is 1.</para>
</listitem>
</varlistentry>
@@ -289,7 +289,7 @@
<listitem>
<para>Please participate in
<ulink url="http://usage.drbd.org">
- <citetitle>DRBD's online usage counter</citetitle></ulink>.
+ <citetitle>DRBD's online usage counter</citetitle></ulink>.
The most convenient way to do so
is to set this option to <option>yes</option>. Valid options are:
<option>yes</option>, <option>no</option> and <option>ask</option>.
@@ -326,14 +326,14 @@
<term><option>device <replaceable>name</replaceable></option></term>
<listitem><para>
The name of the block device node of the resource being described.
- You must use this device with your application (file system) and
+ You must use this device with your application (file system) and
you must not use the low level block device which is specified with the
<option>disk</option> parameter.
</para>
<para>
The device nodes must have the same major number as the DRBD
driver has. With the current implementation major 147 is used
- and the corresponding device nodes are usually named
+ and the corresponding device nodes are usually named
<option>/dev/drbd0</option>, <option>/dev/drbd1</option>, etc.
( All releases before drbd-0.7.1 used major 43 and the device
files /dev/nb*. )
@@ -400,7 +400,7 @@
With the <option>flexible-meta-disk</option> keyword you specify
a block device as meta-data storage. You usually use this whith LVM,
which allows you to have many variable sized block devices.
- The required size of the meta-disk block device is
+ The required size of the meta-disk block device is
36kB + Backing-Storage-size / 32k. Round this number to the next 4kb
boundary up and you have the exact size.
Rule of the thumb: 32kByte per 1GByte of storage, round up to the next
@@ -415,12 +415,12 @@
device reports io-error to the upper layers.
</para>
<para>
- <replaceable>handler</replaceable> may be pass_on, call-local-io-error
+ <replaceable>handler</replaceable> may be pass_on, call-local-io-error
or detach.
</para>
<para>pass_on: Report the io-error to the upper layers. On Primary report
it to the mounted file system. On Secondary ignore it.</para>
- <para>call-local-io-error: Thall the handler script
+ <para>call-local-io-error: Thall the handler script
<option>local-io-error</option>.</para>
<para>detach: The node drops its low level device, and continues in disk
less mode.</para>
@@ -445,15 +445,15 @@
If a node becomes a disconnected primary it tries to outdate
the peer's disk. This is done by calling the outdate-peer
handler. The handler is supposed to reach the other node over
- alternative communication pathes and call 'drbdadm outdate
+ alternative communication pathes and call 'drbdadm outdate
res' there.
</para></listitem></varlistentry>
- <varlistentry><term><option>resource-and-stonith</option></term>
+ <varlistentry><term><option>resource-and-stonith</option></term>
<listitem><para>
If a node becomes a disconnected primary it freezes all
its IO operations and calls its outdate-peer handler. The
outdate-peer hander is supposed to reach the peer over
- alternative communicaton pathes and call 'drbdadm outdate
+ alternative communicaton pathes and call 'drbdadm outdate
res' there. In case it can not reach the peer it should
stonith the peer. IO is resumed as soon as the situation
is resolved. In case your handler fails you can resume
@@ -621,20 +621,20 @@
</para></listitem></varlistentry>
<varlistentry><term><option>discard-younger-primary</option></term>
<listitem><para>
- Auto sync from the node that was primary before the split
+ Auto sync from the node that was primary before the split
brain situation happened.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-older-primary</option></term>
+ <varlistentry><term><option>discard-older-primary</option></term>
<listitem><para>
- Auto sync from the node that became primary as second during
+ Auto sync from the node that became primary as second during
the split brain situation.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-least-changes</option></term>
+ <varlistentry><term><option>discard-least-changes</option></term>
<listitem><para>
- Auto sync from the node that touched more blocks during the
+ Auto sync from the node that touched more blocks during the
split brain situation.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-node-NODENAME</option></term>
+ <varlistentry><term><option>discard-node-NODENAME</option></term>
<listitem><para>
Auto sync to the named node.
</para></listitem></varlistentry>
@@ -656,10 +656,10 @@
<varlistentry><term><option>consensus</option></term>
<listitem><para>
Discard the version of the secondary if the outcome
- if the <option>after-sb-0pri</option> algorithm would also
+ if the <option>after-sb-0pri</option> algorithm would also
destroy the current secondary's data. Otherwise disconnect.
</para></listitem></varlistentry>
- <varlistentry><term><option>violently-as0p</option></term>
+ <varlistentry><term><option>violently-as0p</option></term>
<listitem><para>
Always take the decission of the <option>after-sb-0pri</option>
algorithm. Even if that causes case an erratic change of
@@ -669,11 +669,11 @@
are doing. This is DANGEROUS and MAY CRASH YOUR MACHINE
if you have a FS mounted on the primary node.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-secondary</option></term>
+ <varlistentry><term><option>discard-secondary</option></term>
<listitem><para>
Discard the secondary's version.
</para></listitem></varlistentry>
- <varlistentry><term><option>call-pri-lost-after-sb</option></term>
+ <varlistentry><term><option>call-pri-lost-after-sb</option></term>
<listitem><para>
Always honour the outcome of the <option>after-sb-0pri
</option> algorithm. In case it decides the the current
@@ -783,8 +783,8 @@
<varlistentry>
<term><option>after <replaceable>res-name</replaceable></option></term>
<listitem><para>
- By default resynchronization of all devices would run in parallel.
- By defining an sync-after dependency the resynchronisation of this
+ By default resynchronization of all devices would run in parallel.
+ By defining an sync-after dependency the resynchronisation of this
resource will start only if the resoruce <replaceable>res-name</replaceable>
is already in connected state (=finished its resynchronisation).
</para></listitem>
@@ -810,30 +810,30 @@
<term><option>pri-on-incon-degr <replaceable>cmd</replaceable></option></term>
<listitem><para> This handler is called if the node is primary, degraded
and the local copy of the data is inconsistent.</para></listitem>
- </varlistentry>
+ </varlistentry>
<varlistentry>
<term><option>pri-lost-after-sb <replaceable>cmd</replaceable></option></term>
<listitem><para> The node is currently primary, but lost the after split
brain auto recovery procedure. As as consequence it should go away.
- </para></listitem> </varlistentry>
+ </para></listitem> </varlistentry>
<varlistentry>
<term><option>pri-lost <replaceable>cmd</replaceable></option></term>
<listitem><para> The node is currently primary, but DRBD's algorithm
thinks, that it should become sync target, as consequence it should
give up its primary state.
- </para></listitem> </varlistentry>
+ </para></listitem> </varlistentry>
<varlistentry>
- <term><option>outdate-peer <replaceable>cmd</replaceable></option></term>
+ <term><option>outdate-peer <replaceable>cmd</replaceable></option></term>
<listitem><para> The handler is part of the <option>fencing</option>
mechanism. This handler is called in case the node needs to outdate the
peer's disk. It should use other communication pathes then DRBD's network
link. </para></listitem> </varlistentry>
<varlistentry>
- <term><option>local-io-error <replaceable>cmd</replaceable></option></term>
+ <term><option>local-io-error <replaceable>cmd</replaceable></option></term>
<listitem><para> DRBD got an IO error from the local IO subsystem.
</para></listitem> </varlistentry>
@@ -847,8 +847,8 @@
</refsect1>
<refsect1>
<title>Author</title>
-<simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
-Man pages were reviewed and rewritten by Helmut Wollmersdorfer <email>helmut.wollmersdorfer at linbit.com</email>.
+<simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>.
</simpara>
</refsect1>
<refsect1>
@@ -859,8 +859,9 @@
<refsect1>
<title>Copyright</title>
<simpara>
-Copyright (c) 2001-2006 Philipp Reisner. This is free software;
-see the source for copying conditions. There is NO warranty;
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
Modified: trunk/documentation/drbd.sgml
===================================================================
--- trunk/documentation/drbd.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbd.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -35,14 +35,14 @@
to start and stop drbd on a system V style init system.
</para>
<para>
- In order to use <option>/etc/init.d/drbd</option> you must define
+ In order to use <option>/etc/init.d/drbd</option> you must define
a resource, a host, and any other configuration options in the drbd
configuration file. See <option>/etc/drbd.conf</option> for details.
- If <replaceable>resource</replaceable> is omited, then all of the
+ If <replaceable>resource</replaceable> is omited, then all of the
resouces listed in the config file are configured.
</para>
<para>
- This script might ask you <quote>Do you want to abort waiting for
+ This script might ask you <quote>Do you want to abort waiting for
other server and make this one primary?</quote>
</para>
<para>
@@ -60,7 +60,8 @@
<refsect1>
<title>Author</title>
<simpara>
- Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
+ Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>.
</simpara>
</refsect1>
@@ -74,9 +75,10 @@
<refsect1>
<title>Copyright</title>
<simpara>
- Copyright (c) 2001-2006 Philipp Reisner. This is free software;
- see the source for copying conditions. There is NO warranty;
- not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
+not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
Modified: trunk/documentation/drbdadm.sgml
===================================================================
--- trunk/documentation/drbdadm.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbdadm.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,12 +1,12 @@
<!DOCTYPE RefEntry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
<refentry>
<docinfo><date>09 Feb 2004</date></docinfo>
-
+
<refmeta>
<refentrytitle>drbdadm</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
-
+
<refnamediv>
<refname>drbdadm</refname>
<refpurpose>Administration tool for DRBD</refpurpose>
@@ -30,11 +30,11 @@
<refsect1>
<title>Description</title>
<para>
- Drbdadm is the high level tool of the DRBD program suite. Drbdadm is to
+ Drbdadm is the high level tool of the DRBD program suite. Drbdadm is to
drbdsetup and drbdmeta what ifup/ifdown is to ifconfig. Drbdadm reads its
- configuration file and performs the specified commands by calling the
+ configuration file and performs the specified commands by calling the
drbdsetup and/or the drbdmeta program.
- </para>
+ </para>
</refsect1>
<refsect1>
<title>Options</title>
@@ -43,7 +43,7 @@
<term><option>-d</option>, <option>--dry-run</option></term>
<listitem><para>
Just prints the calls of drbdsetup to stdout, but does not run
- the commands.
+ the commands.
</para></listitem>
</varlistentry>
<varlistentry>
@@ -68,7 +68,7 @@
<replaceable>file</replaceable></term>
<listitem><para>
Specifies the full path to the drbdmeta program. If this option is
- omitted, drbdadm will look for <option>/sbin/drbdmeta</option> and
+ omitted, drbdadm will look for <option>/sbin/drbdmeta</option> and
<option>./drbdsetup</option>.
</para></listitem>
</varlistentry>
@@ -80,7 +80,7 @@
<varlistentry>
<term>attach</term>
<listitem><para>
- Attaches a local backing block device to the DRBD resource's device.
+ Attaches a local backing block device to the DRBD resource's device.
In file system language this would be the mount operation.
</para></listitem>
</varlistentry>
@@ -93,7 +93,7 @@
<varlistentry>
<term>connect</term>
<listitem><para>
- Sets up the network configuration of the resource's device. If the
+ Sets up the network configuration of the resource's device. If the
peer device is already configured, the two DRBD devices will connect.
</para></listitem>
</varlistentry>
@@ -122,25 +122,25 @@
Is a shortcut for disconnect and detach.
</para></listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry>
<term>primary</term>
<listitem><para>
Switch the resource's device into primary state. You need to do
this before you may mount a filesystem onto the device.
</para></listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry>
<term>secondary</term>
<listitem><para>
Brings the device back into secondary state. This is needed since in
a connected DRBD device pair there might only be one of the two peers
in primary state.
- </para></listitem>
+ </para></listitem>
</varlistentry>
<varlistentry>
<term>invalidate</term>
<listitem><para>
- This forces DRBD to consider the data on the local backing
+ This forces DRBD to consider the data on the local backing
storage device as out-of-sync. Therefor DRBD will copy each
and every block over from its peer, to bring the local storage
device back in sync.
@@ -160,7 +160,7 @@
DRBD will reexamine all sizing constraints, and re-size the
resource's device accordingly. E.g. in case you increased the
size of your backing storage devices (on both nodes of course),
- then DRBD will adopt to the new size after you called
+ then DRBD will adopt to the new size after you called
this command on _both_ nodes.
</para></listitem>
</varlistentry>
@@ -168,7 +168,7 @@
<term>create-md</term>
<listitem><para>
Create-md initializes the meta data storage. This needs to be
- done before a DRBD resource can be taken online for the first
+ done before a DRBD resource can be taken online for the first
time.
</para></listitem>
</varlistentry>
@@ -204,7 +204,7 @@
<listitem><para>
Synchronizes the configuration of device with your configuration
file. You should always examine the output of the dry-run
- mode before actually executing this command.
+ mode before actually executing this command.
</para></listitem>
</varlistentry>
<varlistentry>
@@ -216,8 +216,8 @@
<varlistentry>
<term>state</term>
<listitem><para>
- Shows the current states of the devices (local/peer).
- E.g. primary/secondary
+ Shows the current states of the devices (local/peer).
+ E.g. primary/secondary
</para></listitem>
</varlistentry>
<varlistentry>
@@ -243,13 +243,13 @@
</varlistentry>
<varlistentry>
- <term>pause-sync</term>
- <listitem><para>
+ <term>pause-sync</term>
+ <listitem><para>
Temporarily suspend an ongoing resynchronisation by setting the
local pause flag. Resync only progresses if neighter the local
nor the remote pause flag is set. It might be desirable to
postpone DRBD's resynchronisation after eventual
- resynchronisation of the backing storage's RAID setup.
+ resynchronisation of the backing storage's RAID setup.
</para></listitem>
</varlistentry>
@@ -285,7 +285,8 @@
<refsect1>
<title>Author</title>
- <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
+ <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>
</simpara>
</refsect1>
<refsect1>
@@ -296,9 +297,10 @@
<refsect1>
<title>Copyright</title>
<simpara>
- Copyright (c) 2004-2006 Philipp Reisner. This is free software;
- see the source for copying conditions. There is NO warranty;
- not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
+not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
<refsect1>
Modified: trunk/documentation/drbddisk.sgml
===================================================================
--- trunk/documentation/drbddisk.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbddisk.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -34,11 +34,11 @@
used by heartbeat.
</para>
<para>
- In order to use <option>/etc/ha.d/resource.d/drbddisk</option> you must
- define
+ In order to use <option>/etc/ha.d/resource.d/drbddisk</option> you must
+ define
a resource, a host, and any other configuration options in the DRBD
configuration file. See <option>/etc/drbd.conf</option> for details.
- If <replaceable>resource</replaceable> is omitted, then all of the
+ If <replaceable>resource</replaceable> is omitted, then all of the
resources listed in the config file are affected.
</para>
</refsect1>
@@ -52,7 +52,8 @@
<refsect1>
<title>Author</title>
<simpara>
- Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
+ Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>.
</simpara>
</refsect1>
@@ -66,9 +67,10 @@
<refsect1>
<title>Copyright</title>
<simpara>
- Copyright (c) 2004-2006 Philipp Reisner. This is free software;
- see the source for copying conditions. There is NO warranty;
- not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
+not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
Modified: trunk/documentation/drbdmeta.sgml
===================================================================
--- trunk/documentation/drbdmeta.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbdmeta.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,12 +1,12 @@
<!DOCTYPE RefEntry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
<refentry>
<docinfo><date>31 March 2006</date></docinfo>
-
+
<refmeta>
<refentrytitle>drbdmeta</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
-
+
<refnamediv>
<refname>drbdmeta</refname>
<refpurpose>DRBD's meta data management tool</refpurpose>
@@ -34,12 +34,12 @@
command directly but use it through the front end drbdadm.
</para>
<para>
- This command only works if the DRBD resource is currently down,
+ This command only works if the DRBD resource is currently down,
or at least detached from its backing stoage. The first parameter
is the device node assosiated to the resource. With the second
parameter you select which the version of the meta data. Currently
all major DRBD releases (0.6, 0.7 and 0.8) are supported.
- </para>
+ </para>
</refsect1>
<refsect1>
<title>Commands</title>
@@ -48,7 +48,7 @@
<term>create-md</term>
<listitem><para>
Create-md initializes the meta data storage. This needs to be
- done before a DRBD resource can be taken online for the first
+ done before a DRBD resource can be taken online for the first
time. In case there is already a meta data signature of an
older format in place, drbdmeta will ask you if it should
convert the older format to the selected format.
@@ -87,7 +87,7 @@
<varlistentry>
<term>dstate</term>
<listitem><para>
- Prints the state of the backing storag's data. The output
+ Prints the state of the backing storag's data. The output
is always followed by '/DUnknown' since drbdmeta only looks
at the local meta data.
</para></listitem>
@@ -102,15 +102,15 @@
intetionally omitted for the commad's usage output, since you
should only use this if you really know what you are doing.
By setting the generation identifiers to wrong values you
- risk to overwrite your up-to-data data by an older version
+ risk to overwrite your up-to-data data by an older version
of your data.
</para>
<variablelist>
<varlistentry>
<term>set-gi <replaceable>gi</replaceable></term>
<listitem><para>
- Set-gi allows you to set the generation identifier.
- <replaceable>Gi</replaceable> needs to be a generation
+ Set-gi allows you to set the generation identifier.
+ <replaceable>Gi</replaceable> needs to be a generation
counter for the 0.6 and 0.7 format, and a UUID set for 8.0.
Specify it in the same way as get-gi shows it.
</para></listitem>
@@ -134,7 +134,8 @@
<refsect1>
<title>Author</title>
- <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
+ <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>.
</simpara>
</refsect1>
<refsect1>
@@ -145,9 +146,10 @@
<refsect1>
<title>Copyright</title>
<simpara>
- Copyright (c) 2004 Philipp Reisner. This is free software;
- see the source for copying conditions. There is NO warranty;
- not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
+not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
<refsect1>
Modified: trunk/documentation/drbdsetup.sgml
===================================================================
--- trunk/documentation/drbdsetup.sgml 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/documentation/drbdsetup.sgml 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,5 +1,5 @@
<!DOCTYPE RefEntry PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
-<refentry>
+<refentry>
<docinfo><date>30 March 2006</date></docinfo>
<refmeta>
@@ -219,8 +219,8 @@
<varlistentry>
<term><option>--create-device</option></term>
<listitem>
- <para>
- In case the specified DRBD device (minor number) does not
+ <para>
+ In case the specified DRBD device (minor number) does not
exist yet, create it implicitly.
</para>
</listitem>
@@ -229,9 +229,9 @@
<varlistentry>
<term><option>--set-defaults</option></term>
<listitem>
- <para>
- When <option>--set-defaults</option> is given on the
- command line, all options of the invoked sub-command that
+ <para>
+ When <option>--set-defaults</option> is given on the
+ command line, all options of the invoked sub-command that
are not explicitly set are reset to their default values.
</para>
</listitem>
@@ -244,12 +244,12 @@
<refsect2>
<title>disk</title>
<para>
- Associates <replaceable>device</replaceable> with
+ Associates <replaceable>device</replaceable> with
<replaceable>lower_device</replaceable> to store its data blocks on.
The <option>-d</option> (or <option>--disk-size</option>) should
- only be used if you wish not to use as much as possible from the
+ only be used if you wish not to use as much as possible from the
backing block devices.
- If you do not use <option>-d</option> the <replaceable>device</replaceable>
+ If you do not use <option>-d</option> the <replaceable>device</replaceable>
is only ready for use as soon as it was connected to its peer once.
(See the <option>net</option> command.)
</para>
@@ -274,13 +274,13 @@
<listitem>
<para>
If the driver of the <replaceable>lower_device</replaceable>
- reports an error to DRBD, DRBD will either pass the error
+ reports an error to DRBD, DRBD will either pass the error
to the upper layers of the operating system, call a helper
program, or detaches the device from its backing storage and
perform all futher IO by requesting it from the peer. The
valid <replaceable>err_handler</replaceable> are:
- <option>pass_on</option>, <option>call-local-io-error</option>
- and <option>detach</option>.
+ <option>pass_on</option>, <option>call-local-io-error</option>
+ and <option>detach</option>.
</para>
</listitem>
</varlistentry>
@@ -307,15 +307,15 @@
If a node becomes a disconnected primary it tries to outdate
the peer's disk. This is done by calling the outdate-peer
handler. The handler is supposed to reach the other node over
- alternative communication pathes and call 'drbdadm outdate
+ alternative communication pathes and call 'drbdadm outdate
res' there.
</para></listitem></varlistentry>
- <varlistentry><term><option>resource-and-stonith</option></term>
+ <varlistentry><term><option>resource-and-stonith</option></term>
<listitem><para>
If a node becomes a disconnected primary it freezes all
its IO operations and calls its outdate-peer handler. The
outdate-peer hander is supposed to reach the peer over
- alternative communicaton pathes and call 'drbdadm outdate
+ alternative communicaton pathes and call 'drbdadm outdate
res' there. In case it can not reach the peer it should
stonith the peer. IO is resumed as soon as the situation
is resolved. In case your handler fails you can resume
@@ -332,7 +332,7 @@
In case the backing storage's driver has a merge_bvec_fn()
function (At time of writing the only known drivers which
have such a function are: md (software raid driver),
- dm (device mapper - LVM) and DRBD itself) drbd has to
+ dm (device mapper - LVM) and DRBD itself) drbd has to
pretend that it can only process IO requests in units
not lager than 4kByte.</para>
<para>
@@ -350,7 +350,7 @@
<refsect2>
<title>net</title>
<para>
- Sets up the <replaceable>device</replaceable> to listen on
+ Sets up the <replaceable>device</replaceable> to listen on
<replaceable>local_addr:port</replaceable> for incoming connections
and to try to connect to <replaceable>remote_addr:port</replaceable>.
If <replaceable>port</replaceable> is omitted, 7788 is used as default.
@@ -369,7 +369,7 @@
<term><option>-c</option>,
<option>--connect-int <replaceable>time</replaceable></option></term>
<listitem>
- <para>
+ <para>
In case it is not possible to connect to the remote DRBD
device immediately, DRBD keeps on trying to connect. With
this option you can set the time between two tries. The
@@ -381,7 +381,7 @@
<term><option>-i</option>,
<option>--ping-int <replaceable>time</replaceable></option></term>
<listitem>
- <para>
+ <para>
If the TCP/IP connection linking a DRBD device pair is idle
for more than <replaceable>time</replaceable> seconds, DRBD
will generate a keep-alive packet to check if its partner is
@@ -406,7 +406,7 @@
<term><option>-S</option>,
<option>--sndbuf-size <replaceable>size</replaceable></option></term>
<listitem>
- <para>
+ <para>
The socket send buffer is used to store packets sent to the
secondary node, which are not yet acknowledged (from a network
point of view) by the secondary node. When using protocol A,
@@ -415,7 +415,7 @@
and secondary nodes. But keep in mind that more asynchronism
is synonymous with more data loss in the case of a primary
node failure. The default <replaceable>size</replaceable> is
- 128 KB. Default unit is KB.
+ 128 KB. Default unit is KB.
</para>
</listitem>
</varlistentry>
@@ -453,7 +453,7 @@
by DRBD's receiver thread is limited. Should be set to the
same as <option>--max-epoch-size </option>. Small values
could lead to degraded performace. (Minimum 32) The default is
- 2048.
+ 2048.
</para>
</listitem>
</varlistentry>
@@ -480,7 +480,7 @@
With this option set you might make both nodes primary. You
only should use this options if you use a shared storage
file system on top of DRBD. At the time of writing the only
- ones are: OCFS2 and GFS. If you use this option with any
+ ones are: OCFS2 and GFS. If you use this option with any
other filesystem you are goint to crash your nodes and to
corrupt your data!
</para>
@@ -524,20 +524,20 @@
</para></listitem></varlistentry>
<varlistentry><term><option>discard-younger-primary</option></term>
<listitem><para>
- Auto sync from the node that was primary before the split
+ Auto sync from the node that was primary before the split
brain situation happened.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-older-primary</option></term>
+ <varlistentry><term><option>discard-older-primary</option></term>
<listitem><para>
- Auto sync from the node that became primary as second during
+ Auto sync from the node that became primary as second during
the split brain situation.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-least-changes</option></term>
+ <varlistentry><term><option>discard-least-changes</option></term>
<listitem><para>
- Auto sync from the node that touched more blocks during the
+ Auto sync from the node that touched more blocks during the
split brain situation.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-node-NODENAME</option></term>
+ <varlistentry><term><option>discard-node-NODENAME</option></term>
<listitem><para>
Auto sync to the named node.
</para></listitem></varlistentry>
@@ -560,21 +560,21 @@
<varlistentry><term><option>consensus</option></term>
<listitem><para>
Discard the version of the secondary if the outcome
- if the <option>after-sb-0pri</option> algorithm would also
+ if the <option>after-sb-0pri</option> algorithm would also
destroy the current secondary's data. Otherwise disconnect.
</para></listitem></varlistentry>
- <varlistentry><term><option>discard-secondary</option></term>
+ <varlistentry><term><option>discard-secondary</option></term>
<listitem><para>
Discard the secondary's version.
</para></listitem></varlistentry>
- <varlistentry><term><option>call-pri-lost-after-sb</option></term>
+ <varlistentry><term><option>call-pri-lost-after-sb</option></term>
<listitem><para>
Always honour the outcome of the <option>after-sb-0pri
</option> algorithm. In case it decides the the current
- secondary has the right data, call the
+ secondary has the right data, call the
<option>pri-lost-after-sb</option> on the current primary.
</para></listitem></varlistentry>
- <varlistentry><term><option>violently-as0p</option></term>
+ <varlistentry><term><option>violently-as0p</option></term>
<listitem><para>
Always honour the outcome of the <option>after-sb-0pri
</option> algorithm. In case it decides the the current
@@ -597,14 +597,14 @@
<listitem><para>
No automatic resynchronisation, simply disconnect.
</para></listitem></varlistentry>
- <varlistentry><term><option>call-pri-lost-after-sb</option></term>
+ <varlistentry><term><option>call-pri-lost-after-sb</option></term>
<listitem><para>
Always honour the outcome of the <option>after-sb-0pri
</option> algorithm. In case it decides the the current
- secondary has the right data, call the
+ secondary has the right data, call the
<option>pri-lost-after-sb</option> on the current primary.
</para></listitem></varlistentry>
- <varlistentry><term><option>violently-as0p</option></term>
+ <varlistentry><term><option>violently-as0p</option></term>
<listitem><para>
Always honour the outcome of the <option>after-sb-0pri
</option> algorithm. In case it decides the the current
@@ -620,8 +620,8 @@
<option>--rr-conflict </option><replaceable>role-resync-conflict-policy</replaceable></term>
<listitem>
<para>
- This option sets DRBD's behaviour when DRBD deduces from its
- meta data that a resynchronisation is needed, and the SyncTarget
+ This option sets DRBD's behaviour when DRBD deduces from its
+ meta data that a resynchronisation is needed, and the SyncTarget
node is already primary. The possible settings are:
<option>disconnect</option>,
<option>call-pri-lost</option> and
@@ -648,7 +648,7 @@
<para>
The time the peer has time to answer to a keep-alive packet,
it. In case the peer's reply is not received within this
- time period, it is considered as dead. The default is 500ms,
+ time period, it is considered as dead. The default is 500ms,
the default unit is 100ms.
</para>
</listitem>
@@ -659,9 +659,9 @@
<option>--discard-my-data </option></term>
<listitem>
<para>
- Use this option to manually recover from a split brain
+ Use this option to manually recover from a split brain
situation. In case you do not have any automatic after
- split brain policies selected, the nodes refuse to
+ split brain policies selected, the nodes refuse to
connect. By passing this option you make a node to
sync target immediatly after sucessfull connect.
</para>
@@ -685,7 +685,7 @@
To ensure smooth operation of the application on top of DRBD,
it is possible to limit the bandwidth which may be used by
background synchronizations. The default is 250 KB/sec, the
- default unit is KB/sec.
+ default unit is KB/sec.
</para>
</listitem>
</varlistentry>
@@ -693,9 +693,9 @@
<term><option>-a</option>,
<option>--after <replaceable>minor</replaceable></option></term>
<listitem>
- <para>
+ <para>
Start resync on this device only if the device with
- <replaceable>minor</replaceable> is already in connected
+ <replaceable>minor</replaceable> is already in connected
state. Other wise this device wait in SyncPause state.
</para>
</listitem>
@@ -715,7 +715,7 @@
to the meta-data device. A higher number of extents gives
longer resync times but less updates to the meta-data. The
default number of <replaceable>extents</replaceable> is
- 127. (Minimum: 7, Maximum: 3843)
+ 127. (Minimum: 7, Maximum: 3843)
</para>
</listitem>
</varlistentry>
@@ -801,9 +801,9 @@
seconds. If the peer was working before this node got
rebootet, the wfc_timeout is used. If the peer was already
down before this node got rebooted, the degr_wfc_timeout
- is used.
- The default value for <replaceable>wfc_timeout</replaceable>
- is 0 which means to wait forever. The default for
+ is used.
+ The default value for <replaceable>wfc_timeout</replaceable>
+ is 0 which means to wait forever. The default for
<replaceable>degr_wfc_timeout</replaceable> is 120 seconds.
</para>
</listitem>
@@ -822,40 +822,40 @@
<refsect2>
<title>disconnect</title>
<para>
- Removes the information set by the <option>net</option> command
+ Removes the information set by the <option>net</option> command
from the <replaceable>device</replaceable>. This means
- that the <replaceable>device</replaceable> goes into unconnected
+ that the <replaceable>device</replaceable> goes into unconnected
state and that it will no longer listen for incoming connections.
</para>
</refsect2>
<refsect2>
<title>detach</title>
<para>
- Removes the information set by the <option>disk</option> command
+ Removes the information set by the <option>disk</option> command
from the <replaceable>device</replaceable>. This means
that the <replaceable>device</replaceable> is detached from its
- backing storage device.
+ backing storage device.
</para>
</refsect2>
<refsect2>
<title>down</title>
<para>
- Removes all configuration information from the
- <replaceable>device</replaceable> and forces it back to
- unconfigured state.
+ Removes all configuration information from the
+ <replaceable>device</replaceable> and forces it back to
+ unconfigured state.
</para>
</refsect2>
<refsect2>
<title>state</title>
<para>
- Shows the current states of the <replaceable>device</replaceable> and
- its peer. (local/peer).
+ Shows the current states of the <replaceable>device</replaceable> and
+ its peer. (local/peer).
</para>
</refsect2>
<refsect2>
<title>cstate</title>
<para>
- Shows the current connection states of the
+ Shows the current connection states of the
<replaceable>device</replaceable>.
</para>
</refsect2>
@@ -880,7 +880,7 @@
<para>
Temporarily suspend an ongoing resynchronisation by setting the local
pause flag. Resync only progresses if neighter the local nor the
- remote pause flag is set. It might be desirable to postpone DRBD's
+ remote pause flag is set. It might be desirable to postpone DRBD's
resynchronisation after eventual resynchronisation of the backing
storage's RAID setup.
</para>
@@ -895,7 +895,7 @@
<title>outdate</title>
<para>
Mark the data on the local backing storage as outdated. An outdated
- device refuses to become primary. This is used in conjuction with
+ device refuses to become primary. This is used in conjuction with
<option>fencing</option> and by the peer's outdate-peer handler.
</para>
</refsect2>
@@ -947,7 +947,7 @@
<term><option>-a</option>,
<option>--all-devices</option></term>
<listitem>
- <para>
+ <para>
Display the events of all DRBD minors.
</para>
</listitem>
@@ -957,7 +957,7 @@
<term><option>-u</option>,
<option>--unfiltered</option></term>
<listitem>
- <para>
+ <para>
This is an debugging aid, and displays the content of
all received netlink messages.
</para>
@@ -985,7 +985,8 @@
<refsect1>
<title>Author</title>
- <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>.
+ <simpara>Written by Philipp Reisner <email>philipp.reisner at linbit.com</email>
+ and Lars Ellenberg <email>lars.ellenberg at linbit.com</email>
</simpara>
</refsect1>
<refsect1>
@@ -996,9 +997,10 @@
<refsect1>
<title>Copyright</title>
<simpara>
- Copyright (c) 2001-2006 Philipp Reisner. This is free software;
- see the source for copying conditions. There is NO warranty;
- not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+Copyright 2001-2007 LINBIT Information Technologies,
+Philipp Reisner, Lars Ellenberg. This is free software;
+see the source for copying conditions. There is NO warranty;
+not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</simpara>
</refsect1>
<refsect1>
Modified: trunk/drbd/Makefile
===================================================================
--- trunk/drbd/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -25,7 +25,7 @@
# as subdir Makefile, with all appropriate vars and macros set.
#
# note: if you get strange make errors when ARCH=um, you
-# probably need to "make mrproper" in the KDIR first...
+# probably need to "make mrproper" in the KDIR first...
# since 2.6.16, KERNELRELEASE may be empty,
# e.g. when building agains some (broken?) linux-header package.
@@ -63,7 +63,7 @@
# to be overridden on command line:
PREFIX := /
ifeq ($(wildcard ../build-for-uml),../build-for-uml)
- #### for Philipp's convenience :)
+ #### for Philipp's convenience :)
ARCH_UM := "ARCH=um"
KDIR := /usr/src/linux-um
else
Modified: trunk/drbd/Makefile-2.6
===================================================================
--- trunk/drbd/Makefile-2.6 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/Makefile-2.6 2007-01-16 18:51:07 UTC (rev 2702)
@@ -6,6 +6,6 @@
ifndef CONFIG_CONNECTOR
drbd-objs += connector.o cn_queue.o
-endif
+endif
obj-$(CONFIG_BLK_DEV_DRBD) += drbd.o
Modified: trunk/drbd/drbd_actlog.c
===================================================================
--- trunk/drbd/drbd_actlog.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_actlog.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_actlog.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2003-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2003-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2003-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -34,8 +34,8 @@
* ;)
* this is mostly from drivers/md/md.c
*/
-STATIC int _drbd_md_sync_page_io(struct drbd_backing_dev *bdev,
- struct page *page, sector_t sector,
+STATIC int _drbd_md_sync_page_io(struct drbd_backing_dev *bdev,
+ struct page *page, sector_t sector,
int rw, int size)
{
struct bio *bio = bio_alloc(GFP_NOIO, 1);
@@ -243,7 +243,7 @@
}
/* drbd_al_write_transaction(mdev,al_ext,enr);
- generic_make_request() are serialized on the
+ generic_make_request() are serialized on the
current->bio_tail list now. Therefore we have
to deligate writing something to AL to the
worker thread. */
@@ -253,7 +253,7 @@
al_work.w.cb = w_al_write_transaction;
drbd_queue_work_front(&mdev->data.work,&al_work.w);
wait_for_completion(&al_work.event);
-
+
mdev->al_writ_cnt++;
/*
@@ -366,7 +366,7 @@
}
/**
- * drbd_al_read_tr: Reads a single transaction record form the
+ * drbd_al_read_tr: Reads a single transaction record form the
* on disk activity log.
* Returns -1 on IO error, 0 on checksum error and 1 if it is a valid
* record.
@@ -400,7 +400,7 @@
/**
* drbd_al_read_log: Restores the activity log from its on disk
- * representation. Returns 1 on success, returns 0 when
+ * representation. Returns 1 on success, returns 0 when
* reading the log failed due to IO errors.
*/
int drbd_al_read_log(struct Drbd_Conf *mdev,struct drbd_backing_dev *bdev)
@@ -472,7 +472,7 @@
spin_lock_irq(&mdev->al_lock);
- /* This loop runs backwards because in the cyclic
+ /* This loop runs backwards because in the cyclic
elements there might be an old version of the
updated element (in slot 0). So the element in slot 0
can overwrite old versions. */
@@ -668,7 +668,7 @@
// This element should be in the cache
// since drbd_rs_begin_io() pulled it already in.
- // OR an application write finished, and therefore
+ // OR an application write finished, and therefore
// we set something in this area in sync.
int rs_left = drbd_bm_e_weight(mdev,enr);
if (ext->flags != 0) {
@@ -1189,7 +1189,7 @@
dec_local(mdev);
}
spin_unlock_irq(&mdev->al_lock);
-
+
return 0;
}
@@ -1224,7 +1224,7 @@
lbnr = BM_SECT_TO_BIT(nr_sectors-1);
- /*
+ /*
* round up start sector, round down end sector. we make sure we only
* handle full, alligned, BM_BLOCK_SIZE (4K) blocks */
if (unlikely(esector < BM_SECT_PER_BIT-1)) {
Modified: trunk/drbd/drbd_bitmap.c
===================================================================
--- trunk/drbd/drbd_bitmap.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_bitmap.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_bitmap.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2004-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2004-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2004-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2004-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2004-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2004-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -253,7 +253,7 @@
init_waitqueue_head(&b->bm_io_wait);
mdev->bitmap = b;
-
+
return 0;
}
@@ -772,7 +772,7 @@
drbd_blk_run_queue(bdev_get_queue(mdev->bc->md_bdev));
wait_event(b->bm_io_wait, atomic_read(&b->bm_async_io) == 0);
- INFO("%s of bitmap took %lu jiffies\n",
+ INFO("%s of bitmap took %lu jiffies\n",
rw == READ ? "reading" : "writing", jiffies - now);
if (test_bit(BM_MD_IO_ERROR,&b->bm_flags)) {
@@ -1082,7 +1082,7 @@
i = -1;
} else /* (bitnr > b->bm_bits) */ {
ERR("bitnr=%lu > bm_bits=%lu\n",bitnr, b->bm_bits);
- i = 0;
+ i = 0;
}
spin_unlock_irq(&b->bm_lock);
Modified: trunk/drbd/drbd_compat_wrappers.h
===================================================================
--- trunk/drbd/drbd_compat_wrappers.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_compat_wrappers.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -268,7 +268,7 @@
struct crypto_hash *ch;
char *closing_bracket;
- // "hmac(xxx)" is in alg_name we need that xxx.
+ // "hmac(xxx)" is in alg_name we need that xxx.
closing_bracket = strchr(alg_name,')');
if(!closing_bracket) return NULL;
if(closing_bracket-alg_name < 6) return NULL;
@@ -288,7 +288,7 @@
return ch;
}
-static inline int
+static inline int
crypto_hash_setkey(struct crypto_hash *hash,const u8 *key,unsigned int keylen)
{
hash->key = key;
@@ -297,11 +297,11 @@
return 0;
}
-static inline int
+static inline int
crypto_hash_digest(struct hash_desc *desc, struct scatterlist *sg,
unsigned int nbytes, u8 *out)
{
-
+
crypto_hmac(desc->tfm->base, (u8*)desc->tfm->key,
&desc->tfm->keylen, sg, 1 /* ! */ , out);
/* ! this is not generic. Would need to convert nbytes -> nsg */
Modified: trunk/drbd/drbd_int.h
===================================================================
--- trunk/drbd/drbd_int.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_int.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -2,11 +2,11 @@
drbd_int.h
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -689,7 +689,7 @@
CL_ST_CHG_SUCCESS,
CL_ST_CHG_FAIL,
CRASHED_PRIMARY, // This node was a crashed primary. Gets
- // cleared when the state.conn goes into
+ // cleared when the state.conn goes into
// Connected state.
WRITE_BM_AFTER_RESYNC // A kmalloc() during resync failed
};
@@ -915,7 +915,7 @@
extern int drbd_change_state(drbd_dev* mdev, enum chg_state_flags f,
drbd_state_t mask, drbd_state_t val);
extern void drbd_force_state(drbd_dev*, drbd_state_t, drbd_state_t);
-extern int _drbd_request_state(drbd_dev*, drbd_state_t, drbd_state_t,
+extern int _drbd_request_state(drbd_dev*, drbd_state_t, drbd_state_t,
enum chg_state_flags);
extern int _drbd_set_state(drbd_dev*, drbd_state_t, enum chg_state_flags );
extern void print_st_err(drbd_dev*, drbd_state_t, drbd_state_t, int );
@@ -950,9 +950,9 @@
u32 set_size);
extern int drbd_send_ack(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
struct Tl_epoch_entry *e);
-extern int drbd_send_ack_rp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
+extern int drbd_send_ack_rp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
Drbd_BlockRequest_Packet *rp);
-extern int drbd_send_ack_dp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
+extern int drbd_send_ack_dp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
Drbd_Data_Packet *dp);
extern int _drbd_send_page(drbd_dev *mdev, struct page *page,
int offset, size_t size);
@@ -1202,7 +1202,7 @@
}
static inline int
is_mdev_trace(drbd_dev *mdev, unsigned int type, unsigned int level) {
- return (is_trace(type, level) &&
+ return (is_trace(type, level) &&
( ( 1 << mdev_to_minor(mdev)) & trace_devs));
}
@@ -1471,7 +1471,7 @@
}
/* NOTE fall through to detach case if forcedetach set */
case Detach:
- if (_drbd_set_state(_NS(mdev,disk,Failed),ChgStateHard)
+ if (_drbd_set_state(_NS(mdev,disk,Failed),ChgStateHard)
== SS_Success) {
if (printk_ratelimit())
ERR("Local IO failed. Detaching...\n");
@@ -1710,7 +1710,7 @@
* receive_RSDataReply (recv_resync_read) we need to send a WriteAck
* receive_DataRequest (receive_RSDataRequest) we need to send back Data
* receive_Barrier_* we need to send a BarrierAck
- */
+ */
static inline void inc_unacked(drbd_dev* mdev)
{
atomic_inc(&mdev->unacked_cnt);
Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_main.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -304,8 +304,8 @@
* NOTE: we set ourselves FAILED here if on_io_error is Detach or Panic OR
* if the forcedetach flag is set. This flag is set when failures
* occur writing the meta data portion of the disk as they are
- * not recoverable. We also try to write the "need full sync bit" here
- * anyways. This is to make sure that you get a resynchronisation of
+ * not recoverable. We also try to write the "need full sync bit" here
+ * anyways. This is to make sure that you get a resynchronisation of
* the full device the next time you connect.
*/
int drbd_io_error(drbd_dev* mdev, int forcedetach)
@@ -352,11 +352,11 @@
return ok;
}
-/**
+/**
* cl_wide_st_chg:
* Returns TRUE if this state change should be preformed as a cluster wide
* transaction. Of course it returns 0 as soon as the connection is lost.
- */
+ */
STATIC int cl_wide_st_chg(drbd_dev* mdev, drbd_state_t os, drbd_state_t ns)
{
return ( os.conn >= Connected && ns.conn >= Connected &&
@@ -400,10 +400,10 @@
unsigned long flags;
int rv;
- if(test_and_clear_bit(CL_ST_CHG_SUCCESS,&mdev->flags))
+ if(test_and_clear_bit(CL_ST_CHG_SUCCESS,&mdev->flags))
return SS_CW_Success;
- if(test_and_clear_bit(CL_ST_CHG_FAIL,&mdev->flags))
+ if(test_and_clear_bit(CL_ST_CHG_FAIL,&mdev->flags))
return SS_CW_FailedByPeer;
rv=0;
@@ -423,12 +423,12 @@
return rv;
}
-/**
+/**
* _drbd_request_state:
* This function is the most gracefull way to change state. For some state
* transition this function even does a cluster wide transaction.
* It has a cousin named drbd_request_state(), which is always verbose.
- */
+ */
int _drbd_request_state(drbd_dev* mdev, drbd_state_t mask, drbd_state_t val,
enum chg_state_flags f)
{
@@ -536,13 +536,13 @@
if(inc_net(mdev)) {
if( !mdev->net_conf->two_primaries &&
- ns.role == Primary && ns.peer == Primary )
+ ns.role == Primary && ns.peer == Primary )
rv=SS_TwoPrimaries;
dec_net(mdev);
}
if( rv <= 0 ) /* already found a reason to abort */;
- else if( ns.role == Secondary && mdev->open_cnt )
+ else if( ns.role == Secondary && mdev->open_cnt )
rv=SS_DeviceInUse;
else if( ns.role == Primary && ns.conn < Connected &&
@@ -554,9 +554,9 @@
else if( ns.role == Primary && ns.disk <= Inconsistent &&
ns.pdsk <= Inconsistent ) rv=SS_NoUpToDateDisk;
-
+
else if( ns.conn > Connected &&
- ns.disk < UpToDate && ns.pdsk < UpToDate )
+ ns.disk < UpToDate && ns.pdsk < UpToDate )
rv=SS_BothInconsistent;
else if( ns.conn > Connected &&
@@ -579,10 +579,10 @@
if( (ns.conn == StartingSyncT || ns.conn == StartingSyncS ) &&
os.conn > Connected) rv=SS_ResyncRunning;
- if( ns.conn == Disconnecting && os.conn == StandAlone)
+ if( ns.conn == Disconnecting && os.conn == StandAlone)
rv=SS_AlreadyStandAlone;
- if( ns.disk == Outdated && os.disk == Diskless)
+ if( ns.disk == Outdated && os.disk == Diskless)
rv=SS_CanNotOutdateDL;
return rv;
@@ -603,7 +603,7 @@
fp = mdev->bc->dc.fencing;
dec_local(mdev);
}
-
+
/* Early state sanitising. Dissalow the invalidate ioctl to connect */
if( (ns.conn == StartingSyncS || ns.conn == StartingSyncT) &&
os.conn < Connected ) {
@@ -612,14 +612,14 @@
}
/* Dissalow Network errors to configure a device's network part */
- if( (ns.conn >= Timeout && ns.conn <= TearDown ) &&
+ if( (ns.conn >= Timeout && ns.conn <= TearDown ) &&
os.conn <= Disconnecting ) {
ns.conn = os.conn;
}
/* Dissalow network errors (+TearDown) to overwrite each other.
Dissalow network errors to overwrite the Disconnecting state. */
- if( ( (os.conn >= Timeout && os.conn <= TearDown)
+ if( ( (os.conn >= Timeout && os.conn <= TearDown)
|| os.conn == Disconnecting ) &&
ns.conn >= Timeout && ns.conn <= TearDown ) {
ns.conn = os.conn;
@@ -628,7 +628,7 @@
if( ns.conn < Connected ) {
ns.peer_isp = 0;
ns.peer = Unknown;
- if ( ns.pdsk > DUnknown ||
+ if ( ns.pdsk > DUnknown ||
ns.pdsk < Inconsistent ) ns.pdsk = DUnknown;
}
@@ -847,13 +847,13 @@
if (test_bit(CRASHED_PRIMARY,&mdev->flags) ||
mdev->state.role == Primary ||
- ( mdev->state.pdsk < Inconsistent &&
+ ( mdev->state.pdsk < Inconsistent &&
mdev->state.peer == Primary ) ) mdf |= MDF_PrimaryInd;
if (mdev->state.conn > WFReportParams) mdf |= MDF_ConnectedInd;
if (mdev->state.disk > Inconsistent) mdf |= MDF_Consistent;
if (mdev->state.disk > Outdated) mdf |= MDF_WasUpToDate;
- if (mdev->state.pdsk <= Outdated &&
- mdev->state.pdsk >= Inconsistent) mdf |= MDF_PeerOutDated;
+ if (mdev->state.pdsk <= Outdated &&
+ mdev->state.pdsk >= Inconsistent) mdf |= MDF_PeerOutDated;
if( mdf != mdev->bc->md.flags) {
mdev->bc->md.flags = mdf;
drbd_md_mark_dirty(mdev);
@@ -874,7 +874,7 @@
(os.conn < Connected && ns.conn >= Connected) ) {
tl_clear(mdev);
spin_lock_irq(&mdev->req_lock);
- _drbd_set_state(_NS(mdev,susp,0),
+ _drbd_set_state(_NS(mdev,susp,0),
ChgStateVerbose | ScheduleAfter );
spin_unlock_irq(&mdev->req_lock);
}
@@ -905,12 +905,12 @@
/* Only do it if we have not yet done it... */
drbd_uuid_new_current(mdev);
}
- if (ns.peer == Primary ) {
+ if (ns.peer == Primary ) {
/* Note: The condition ns.peer == Primary implies
that we are connected. Otherwise it would
be ns.peer == Unknown. */
/* Our peer lost its disk.
- Not rotation into BitMap-UUID! A FullSync is
+ Not rotation into BitMap-UUID! A FullSync is
required after a primary detached from it disk! */
u64 uuid;
INFO("Creating new current UUID [no BitMap]\n");
@@ -970,7 +970,7 @@
if (ns.conn == StartingSyncT) {
spin_lock_irq(&mdev->req_lock);
- _drbd_set_state(_NS(mdev,conn,WFSyncUUID),
+ _drbd_set_state(_NS(mdev,conn,WFSyncUUID),
ChgStateVerbose | ScheduleAfter );
spin_unlock_irq(&mdev->req_lock);
} else /* StartingSyncS */ {
@@ -992,7 +992,7 @@
drbd_md_clear_flag(mdev,MDF_FullSync);
drbd_md_sync(mdev);
- drbd_bm_unlock(mdev);
+ drbd_bm_unlock(mdev);
}
if ( os.disk > Diskless && ns.disk == Diskless ) {
@@ -1442,11 +1442,11 @@
return ok;
}
-/**
+/**
* _drbd_send_ack:
* This helper function expects the sector and block_id parameter already
* in big endian!
- */
+ */
STATIC int _drbd_send_ack(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
u64 sector,
u32 blksize,
@@ -1465,7 +1465,7 @@
return ok;
}
-int drbd_send_ack_dp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
+int drbd_send_ack_dp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
Drbd_Data_Packet *dp)
{
const int header_size = sizeof(Drbd_Data_Packet) - sizeof(Drbd_Header);
@@ -1475,7 +1475,7 @@
dp->block_id);
}
-int drbd_send_ack_rp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
+int drbd_send_ack_rp(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
Drbd_BlockRequest_Packet *rp)
{
return _drbd_send_ack(mdev,cmd,rp->sector,rp->blksize,rp->block_id);
@@ -1675,7 +1675,7 @@
if(req->master_bio->bi_rw & BIO_RW_SYNC) {
dp_flags |= DP_RW_SYNC;
}
- if(mdev->state.conn >= SyncSource &&
+ if(mdev->state.conn >= SyncSource &&
mdev->state.conn <= PausedSyncT) {
dp_flags |= DP_MAY_SET_IN_SYNC;
}
@@ -2436,7 +2436,7 @@
printk(KERN_ERR DEVICE_NAME": unable to register proc file\n");
goto Enomem;
}
-
+
drbd_proc->proc_fops = &drbd_proc_fops;
drbd_proc->owner = THIS_MODULE;
#else
@@ -2518,10 +2518,10 @@
} __attribute((packed));
-/**
+/**
* drbd_md_sync:
* Writes the meta data super block if the MD_DIRTY flag bit is set.
- */
+ */
void drbd_md_sync(drbd_dev *mdev)
{
struct meta_data_on_disk * buffer;
@@ -2584,13 +2584,13 @@
dec_local(mdev);
}
-/**
+/**
* drbd_md_read:
* @bdev: describes the backing storage and the meta-data storage
- * Reads the meta data from bdev. Return 0 (NoError) on success, and an
- * enum ret_codes in case something goes wrong.
+ * Reads the meta data from bdev. Return 0 (NoError) on success, and an
+ * enum ret_codes in case something goes wrong.
* Currently only: MDIOError, MDInvalid.
- */
+ */
int drbd_md_read(drbd_dev *mdev, struct drbd_backing_dev *bdev)
{
struct meta_data_on_disk * buffer;
@@ -2660,10 +2660,10 @@
return rv;
}
-/**
+/**
* drbd_md_mark_dirty:
* Call this function if you change enything that should be written to
- * the meta-data super block. This function sets MD_DIRTY, and starts a
+ * the meta-data super block. This function sets MD_DIRTY, and starts a
* timer that ensures that within five seconds you have to call drbd_md_sync().
*/
void drbd_md_mark_dirty(drbd_dev *mdev)
@@ -2884,7 +2884,7 @@
}
/* Pretty print a UUID value */
-void
+void
drbd_print_uuid(drbd_dev *mdev, unsigned int idx) {
INFO(" uuid[%s] now %016llX\n",_drbd_uuid_str(idx),mdev->bc->md.uuid[idx]);
}
@@ -2936,7 +2936,7 @@
const unsigned char *p;
int count;
- // verify size parameter
+ // verify size parameter
if (size != sizeof(char) && size != sizeof(short) && size != sizeof(int)) {
printk(KERN_DEBUG "drbd_print_buffer: ERROR invalid size %d\n", size);
return;
@@ -3096,7 +3096,7 @@
case Data:
INFOP("%s (sector %llus, id %s, seq %u, f %x)\n", cmdname(cmd),
- (unsigned long long)be64_to_cpu(p->Data.sector),
+ (unsigned long long)be64_to_cpu(p->Data.sector),
_dump_block_id(p->Data.block_id,tmp),
be32_to_cpu(p->Data.seq_num),
be32_to_cpu(p->Data.dp_flags)
@@ -3106,7 +3106,7 @@
case DataReply:
case RSDataReply:
INFOP("%s (sector %llus, id %s)\n", cmdname(cmd),
- (unsigned long long)be64_to_cpu(p->Data.sector),
+ (unsigned long long)be64_to_cpu(p->Data.sector),
_dump_block_id(p->Data.block_id,tmp)
);
break;
@@ -3118,7 +3118,7 @@
case NegAck:
case NegRSDReply:
INFOP("%s (sector %llus, size %u, id %s, seq %u)\n", cmdname(cmd),
- (long long)be64_to_cpu(p->BlockAck.sector),
+ (long long)be64_to_cpu(p->BlockAck.sector),
be32_to_cpu(p->BlockAck.blksize),
_dump_block_id(p->BlockAck.block_id,tmp),
be32_to_cpu(p->BlockAck.seq_num)
@@ -3128,7 +3128,7 @@
case DataRequest:
case RSDataRequest:
INFOP("%s (sector %llus, size %u, id %s)\n", cmdname(cmd),
- (long long)be64_to_cpu(p->BlockRequest.sector),
+ (long long)be64_to_cpu(p->BlockRequest.sector),
be32_to_cpu(p->BlockRequest.blksize),
_dump_block_id(p->BlockRequest.block_id,tmp)
);
@@ -3148,7 +3148,7 @@
break;
case ReportSizes:
- INFOP("%s (d %lluMiB, u %lluMiB, c %lldMiB, max bio %x, q order %x)\n", cmdname(cmd),
+ INFOP("%s (d %lluMiB, u %lluMiB, c %lldMiB, max bio %x, q order %x)\n", cmdname(cmd),
(long long)(be64_to_cpu(p->Sizes.d_size)>>(20-9)),
(long long)(be64_to_cpu(p->Sizes.u_size)>>(20-9)),
(long long)(be64_to_cpu(p->Sizes.c_size)>>(20-9)),
@@ -3171,7 +3171,7 @@
break;
case StateChgReply:
- INFOP("%s (ret %x)\n", cmdname(cmd),
+ INFOP("%s (ret %x)\n", cmdname(cmd),
be32_to_cpu(p->RqSReply.retcode));
break;
@@ -3209,7 +3209,7 @@
complete? "<<<":">>>",
bio_rw(bio)==WRITE?"Write":"Read",bio,
complete? (drbd_bio_uptodate(bio)? "Success, ":"Failed, ") : "",
- bio->bi_sector << SECTOR_SHIFT,
+ bio->bi_sector << SECTOR_SHIFT,
bio->bi_size);
if (trace_level >= TraceLvlMetrics &&
@@ -3225,9 +3225,9 @@
bvec_buf = bvec_kmap_irq(bvec, &flags);
- drbd_print_buffer(" ",DBGPRINT_BUFFADDR,1,
- bvec_buf,
- faddr,
+ drbd_print_buffer(" ",DBGPRINT_BUFFADDR,1,
+ bvec_buf,
+ faddr,
(bvec->bv_len <= 0x80)? bvec->bv_len : 0x80);
bvec_kunmap_irq(bvec_buf, &flags);
Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_nl.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_nl.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -81,7 +81,7 @@
case pn: /* D_ASSERT( tag_type(tag) == TT_STRING ); */ \
arg->member ## _len = dlen; \
memcpy(arg->member,tags,dlen); \
- break;
+ break;
#include "linux/drbd_nl.h"
// Generate the struct to tag_list functions
@@ -97,7 +97,7 @@
*tags++ = pn | pr | TT_INTEGER; \
*tags++ = sizeof(int); \
*(int*)tags = arg->member; \
- tags = (unsigned short*)((char*)tags+sizeof(int));
+ tags = (unsigned short*)((char*)tags+sizeof(int));
#define INT64(pn,pr,member) \
*tags++ = pn | pr | TT_INT64; \
*tags++ = sizeof(u64); \
@@ -140,7 +140,7 @@
struct cn_msg *req = data;
struct drbd_nl_cfg_req *nlp = (struct drbd_nl_cfg_req*)req->data;
- printk(KERN_INFO DEVICE_NAME "%d: "
+ printk(KERN_INFO DEVICE_NAME "%d: "
"Netlink: << %s (%d) - seq: %x, ack: %x, len: %x\n",
nlp->drbd_minor,
nl_packet_name(nlp->packet_type),
@@ -152,10 +152,10 @@
struct cn_msg *req = data;
struct drbd_nl_cfg_reply *nlp = (struct drbd_nl_cfg_reply*)req->data;
- printk(KERN_INFO DEVICE_NAME "%d: "
+ printk(KERN_INFO DEVICE_NAME "%d: "
"Netlink: >> %s (%d) - seq: %x, ack: %x, len: %x\n",
nlp->minor,
- nlp->packet_type==P_nl_after_last_packet?
+ nlp->packet_type==P_nl_after_last_packet?
"Empty-Reply" : nl_packet_name(nlp->packet_type),
nlp->packet_type,
req->seq, req->ack, req->len);
@@ -246,8 +246,8 @@
while (try++ < 3) {
r = _drbd_request_state(mdev,mask,val,0);
- if( r == SS_NoUpToDateDisk && force &&
- ( mdev->state.disk == Inconsistent ||
+ if( r == SS_NoUpToDateDisk && force &&
+ ( mdev->state.disk == Inconsistent ||
mdev->state.disk == Outdated ) ) {
mask.disk = disk_mask;
val.disk = UpToDate;
@@ -495,7 +495,7 @@
return rv;
}
-sector_t
+sector_t
drbd_new_dev_size(struct Drbd_Conf* mdev, struct drbd_backing_dev *bdev)
{
sector_t p_size = mdev->p_size; // partner's disk size.
@@ -535,7 +535,7 @@
return size;
}
-/**
+/**
* drbd_check_al_size:
* checks that the al lru is of requested size, and if neccessary tries to
* allocate a new one. returns -EBUSY if current al lru is still used,
@@ -609,9 +609,9 @@
// KERNEL BUG. in ll_rw_blk.c
// t->max_segment_size = min(t->max_segment_size,b->max_segment_size);
- // should be
+ // should be
// t->max_segment_size = min_not_zero(...,...)
-
+
// workaround here:
if(q->max_segment_size == 0) q->max_segment_size = max_seg_s;
@@ -1394,7 +1394,7 @@
struct drbd_nl_cfg_reply *reply)
{
unsigned short *tl;
-
+
tl = reply->tag_list;
if(inc_local(mdev)) {
@@ -1430,7 +1430,7 @@
struct drbd_nl_cfg_reply *reply)
{
unsigned short *tl;
-
+
tl = reply->tag_list;
if(inc_local(mdev)) {
@@ -1476,14 +1476,14 @@
if(!mdev && (nlp->flags & DRBD_NL_CREATE_DEVICE)) {
mdev = drbd_new_device(nlp->drbd_minor);
-
+
spin_lock_irq(&drbd_pp_lock);
if( minor_table[nlp->drbd_minor] == NULL) {
minor_table[nlp->drbd_minor] = mdev;
mdev = NULL;
}
spin_unlock_irq(&drbd_pp_lock);
-
+
if(mdev) {
if(mdev->app_reads_hash) kfree(mdev->app_reads_hash);
if(mdev->md_io_page) __free_page(mdev->md_io_page);
@@ -1499,7 +1499,7 @@
struct cn_handler_struct {
int (*function)(drbd_dev *,
- struct drbd_nl_cfg_req *,
+ struct drbd_nl_cfg_req *,
struct drbd_nl_cfg_reply* );
int reply_body_size;
};
@@ -1542,7 +1542,7 @@
struct drbd_nl_cfg_reply* reply;
drbd_dev *mdev;
int retcode,rr;
- int reply_size = sizeof(struct cn_msg)
+ int reply_size = sizeof(struct cn_msg)
+ sizeof(struct drbd_nl_cfg_reply)
+ sizeof(short int);
@@ -1578,7 +1578,7 @@
// reply->tag_list; might be modified by cm->fucntion.
rr = cm->function(mdev,nlp,reply);
-
+
cn_reply->id = req->id;
cn_reply->seq = req->seq;
cn_reply->ack = req->ack + 1;
@@ -1621,7 +1621,7 @@
cn_reply->seq = atomic_add_return(1,&drbd_nl_seq);
cn_reply->ack = 0; // not used here.
- cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
+ cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char*)tl - (char*)reply->tag_list);
cn_reply->flags = 0;
@@ -1659,7 +1659,7 @@
cn_reply->seq = atomic_add_return(1,&drbd_nl_seq);
cn_reply->ack = 0; // not used here.
- cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
+ cn_reply->len = sizeof(struct drbd_nl_cfg_reply) +
(int)((char*)tl - (char*)reply->tag_list);
cn_reply->flags = 0;
@@ -1672,7 +1672,7 @@
cn_netlink_send(cn_reply, CN_IDX_DRBD, GFP_KERNEL);
}
-#ifdef NETLINK_ROUTE6
+#ifdef NETLINK_ROUTE6
int __init cn_init(void);
void __exit cn_fini(void);
#endif
@@ -1682,7 +1682,7 @@
static struct cb_id cn_id_drbd = { CN_IDX_DRBD, CN_VAL_DRBD };
int err;
-#ifdef NETLINK_ROUTE6
+#ifdef NETLINK_ROUTE6
/* pre 2.6.16 */
err = cn_init();
if(err) return err;
@@ -1702,13 +1702,13 @@
cn_del_callback(&cn_id_drbd);
-#ifdef NETLINK_ROUTE6
+#ifdef NETLINK_ROUTE6
/* pre 2.6.16 */
cn_fini();
#endif
}
-void drbd_nl_send_reply( struct cn_msg *req,
+void drbd_nl_send_reply( struct cn_msg *req,
int ret_code)
{
char buffer[sizeof(struct cn_msg)+sizeof(struct drbd_nl_cfg_reply)];
Modified: trunk/drbd/drbd_proc.c
===================================================================
--- trunk/drbd/drbd_proc.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_proc.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_proc.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_receiver.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_receiver.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_req.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_req.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -84,8 +84,8 @@
s & RQ_NET_SENT ? 's' : '-',
s & RQ_NET_DONE ? 'd' : '-',
s & RQ_NET_OK ? 'o' : '-',
- req->epoch,
- (unsigned long long)req->sector,
+ req->epoch,
+ (unsigned long long)req->sector,
req->size,
conns_to_name(mdev->state.conn));
}
@@ -698,8 +698,8 @@
s & RQ_NET_SENT ? 's' : '-',
s & RQ_NET_DONE ? 'd' : '-',
s & RQ_NET_OK ? 'o' : '-',
- req->epoch,
- (unsigned long long)req->sector,
+ req->epoch,
+ (unsigned long long)req->sector,
req->size,
conns_to_name(mdev->state.conn));
}
@@ -1010,8 +1010,8 @@
* was not detached below us? */
req->private_bio->bi_bdev = mdev->bc->backing_bdev;
- if (FAULT_ACTIVE(rw==WRITE ? DRBD_FAULT_DT_WR :
- ( rw==READ ? DRBD_FAULT_DT_RD :
+ if (FAULT_ACTIVE(rw==WRITE ? DRBD_FAULT_DT_WR :
+ ( rw==READ ? DRBD_FAULT_DT_RD :
DRBD_FAULT_DT_RA ) ))
bio_endio(req->private_bio, req->private_bio->bi_size, -EIO);
else
Modified: trunk/drbd/drbd_req.h
===================================================================
--- trunk/drbd/drbd_req.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_req.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -2,10 +2,11 @@
drbd_req.h
Kernel module for 2.6.x Kernels
- This file is part of DRBD
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2006-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2006-2007, Lars Ellenberg <lars.ellenberg at linbit.com>.
+ Copyright (C) 2006-2007, Philipp Reisner <philipp.reisner at 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
@@ -176,7 +177,7 @@
* was successfully written on the peer.
*/
__RQ_NET_OK,
-
+
/* peer called drbd_set_in_sync() for this write */
__RQ_NET_SIS,
};
@@ -231,7 +232,7 @@
return req;
}
}
- ERR("_ack_id_to_req: failed to find req %p, sector %llus in list\n",
+ ERR("_ack_id_to_req: failed to find req %p, sector %llus in list\n",
(void*)(unsigned long)id, (unsigned long long)sector);
return NULL;
}
Modified: trunk/drbd/drbd_strings.c
===================================================================
--- trunk/drbd/drbd_strings.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_strings.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -2,8 +2,12 @@
drbd.h
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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)
@@ -65,7 +69,7 @@
static const char *drbd_state_sw_errors[] = {
[-SS_TwoPrimaries] = "Multiple primaries not allowed by config",
- [-SS_NoUpToDateDisk] =
+ [-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",
Modified: trunk/drbd/drbd_worker.c
===================================================================
--- trunk/drbd/drbd_worker.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/drbd_worker.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
drbd_worker.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -333,7 +333,7 @@
break;
// Be always aligned
- if (sector & ((1<<(align+3))-1) )
+ if (sector & ((1<<(align+3))-1) )
break;
// do not cross extent boundaries
@@ -409,7 +409,7 @@
// there are RSDataReply Packets lingering on the worker's
// queue (or even the read operations for those packets
// is not finished by now). Retry in 100ms.
-
+
drbd_kick_lo(mdev);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ / 10);
@@ -463,12 +463,12 @@
drbd_uuid_set_bm(mdev,0UL);
if ( mdev->p_uuid ) {
- // Now the two UUID sets are equal, update what we
+ // Now the two UUID sets are equal, update what we
// know of the peer.
int i;
for ( i=Current ; i<=History_end ; i++ ) {
mdev->p_uuid[i]=mdev->bc->md.uuid[i];
- }
+ }
}
}
@@ -669,7 +669,7 @@
req_mod(req, handed_over_to_network, 0);
} else {
/* ?? we set Timeout or BrokenPipe in drbd_send() */
- if (mdev->state.conn >= Connected)
+ if (mdev->state.conn >= Connected)
drbd_force_state(mdev,NS(conn,NetworkFailure));
/* req_mod(req, send_failed); we should not fail it here,
* we might have to "freeze" on disconnect.
@@ -714,17 +714,17 @@
ERR_IF(!odev) return 1;
if( (odev->state.conn >= SyncSource &&
odev->state.conn <= PausedSyncT) ||
- odev->state.aftr_isp || odev->state.peer_isp ||
+ odev->state.aftr_isp || odev->state.peer_isp ||
odev->state.user_isp ) return 0;
}
}
-/**
+/**
* _drbd_pause_after:
* Finds all devices that may not resync now, and causes them to
* pause their resynchronisation.
* Called from process context only ( ioctl and after_state_ch ).
- */
+ */
STATIC int _drbd_pause_after(drbd_dev *mdev)
{
drbd_dev *odev;
@@ -742,12 +742,12 @@
return rv;
}
-/**
+/**
* _drbd_resume_next:
* Finds all devices that can resume resynchronisation
* process, and causes them to resume.
* Called from process context only ( ioctl and worker ).
- */
+ */
STATIC int _drbd_resume_next(drbd_dev *mdev)
{
drbd_dev *odev;
@@ -824,7 +824,7 @@
get_random_bytes(&uuid, sizeof(u64));
drbd_uuid_set(mdev, Bitmap, uuid);
drbd_send_sync_uuid(mdev,uuid);
-
+
D_ASSERT(mdev->state.disk == UpToDate);
}
Modified: trunk/drbd/linux/drbd.h
===================================================================
--- trunk/drbd/linux/drbd.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/linux/drbd.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -2,8 +2,12 @@
drbd.h
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2001-2007, Lars Ellenberg <lars.ellenberg at 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)
@@ -140,7 +144,7 @@
Timeout, /// These temporal states are all used on the way
BrokenPipe, /// from >= Connected to Unconnected.
NetworkFailure, /// The 'disconnect reason' states
- ProtocolError, ///
+ ProtocolError, ///
TearDown, /// I do not allow to change beween them.
WFConnection,
WFReportParams, // we have a socket
@@ -181,7 +185,7 @@
unsigned susp : 1 ; // 2/2 IO suspended no/yes
unsigned aftr_isp : 1 ; // isp .. imposed sync pause
unsigned peer_isp : 1 ;
- unsigned user_isp : 1 ;
+ unsigned user_isp : 1 ;
unsigned _pad : 11; // 0 unused
};
unsigned int i;
Modified: trunk/drbd/linux/drbd_limits.h
===================================================================
--- trunk/drbd/linux/drbd_limits.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/linux/drbd_limits.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
/*
drbd_limits.h
- This file is part of drbd by Philipp Reisner / Lars Ellenberg.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
*/
/*
@@ -110,7 +110,7 @@
* but more than 3998G are currently not possible */
/* DRBD_MAX_SECTORS */
#define DRBD_DISK_SIZE_SECT_MIN 0
-#define DRBD_DISK_SIZE_SECT_MAX (128LLU*1024*2 - 72)*512LLU*8*8
+#define DRBD_DISK_SIZE_SECT_MAX ((128LLU*1024*2 - 72)*512LLU*8*8)
#define DRBD_DISK_SIZE_SECT_DEF 0 // = disabled = no user size...
#define DRBD_ON_IO_ERROR_DEF PassOn
Modified: trunk/drbd/linux/drbd_nl.h
===================================================================
--- trunk/drbd/linux/drbd_nl.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/linux/drbd_nl.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,4 +1,4 @@
-/*
+/*
PAKET( name,
TYPE ( pn, pr, member )
...
@@ -18,7 +18,7 @@
PACKET(secondary, 2, )
PACKET(disk_conf, 3,
- INT64( 2, T_MAY_IGNORE, disk_size)
+ INT64( 2, T_MAY_IGNORE, disk_size)
STRING( 3, T_MANDATORY, backing_dev, 32)
STRING( 4, T_MANDATORY, meta_dev, 32)
INTEGER( 5, T_MANDATORY, meta_dev_idx)
@@ -54,14 +54,14 @@
PACKET(disconnect, 6, )
-PACKET(resize, 7,
- INT64( 29, T_MAY_IGNORE, resize_size)
+PACKET(resize, 7,
+ INT64( 29, T_MAY_IGNORE, resize_size)
)
PACKET(syncer_conf, 8,
INTEGER( 30, T_MAY_IGNORE, rate)
- INTEGER( 31, T_MAY_IGNORE, after)
- INTEGER( 32, T_MAY_IGNORE, al_extents)
+ INTEGER( 31, T_MAY_IGNORE, after)
+ INTEGER( 32, T_MAY_IGNORE, al_extents)
)
PACKET(invalidate, 9, )
@@ -78,10 +78,10 @@
PACKET(get_uuids, 18,
STRING( 34, T_MAY_IGNORE, uuids, (UUID_SIZE*sizeof(__u64)))
- INTEGER( 35, T_MAY_IGNORE, uuids_flags)
+ INTEGER( 35, T_MAY_IGNORE, uuids_flags)
)
-PACKET(get_timeout_flag, 19,
+PACKET(get_timeout_flag, 19,
BIT( 36, T_MAY_IGNORE, use_degraded)
)
Modified: trunk/drbd/linux/drbd_tag_magic.h
===================================================================
--- trunk/drbd/linux/drbd_tag_magic.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/linux/drbd_tag_magic.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -27,7 +27,7 @@
// declate tag-list-sizes
const int tag_list_sizes[] = {
#define PACKET(name,number,fields) 2 fields ,
-#define INTEGER(pn,pr,member) +4+4
+#define INTEGER(pn,pr,member) +4+4
#define INT64(pn,pr,member) +4+8
#define BIT(pn,pr,member) +4+1
#define STRING(pn,pr,member,len) +4+len
Modified: trunk/drbd/lru_cache.c
===================================================================
--- trunk/drbd/lru_cache.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/lru_cache.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
lru_cache.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2003-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2003-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2003-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -359,7 +359,7 @@
if( e->lc_number == LC_FREE ) {
seq_printf(seq,"\t%2d: FREE\n",i );
} else {
- seq_printf(seq,"\t%2d: %4u %4u ", i,
+ seq_printf(seq,"\t%2d: %4u %4u ", i,
e->lc_number,
e->refcnt );
detail(seq,e);
Modified: trunk/drbd/lru_cache.h
===================================================================
--- trunk/drbd/lru_cache.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd/lru_cache.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,11 +3,11 @@
lru_cache.c
Kernel module for 2.6.x Kernels
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2003-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2003-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2003-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/drbd.spec.in
===================================================================
--- trunk/drbd.spec.in 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/drbd.spec.in 2007-01-16 18:51:07 UTC (rev 2702)
@@ -7,29 +7,29 @@
#
# this results in strange names for e.g. smp4G, psmp,
# -smp-lge or whatnot.
-#--
+#--
# %define kversion %(echo %{kernelversion} | sed -e s/smp// -)
# %define krelver %(echo %{kversion} | tr -s '-' '_')
# %if %(echo %{kernelversion} | grep -c smp)
# %{expand:%%define ksmp -smp}
# %endif
-#--
+#--
# so I choose to have it thus:
%define krelver %(echo %{kernelversion} | tr -s '-' '_')
Name: drbd
Summary: Distributed Redundant Block Device driver for Linux
-Version:
+Version:
Release: 3
Source: %{name}-%{version}.tar.gz
-Vendor: DRBD
+Vendor: DRBD
License: GPL
ExclusiveOS: linux
Group: System Environment/Kernel
-Packager:
+Packager:
Requires: kernel
Provides: %{name}
-URL: http://www.drbd.org/
+URL: http://www.drbd.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
@@ -41,7 +41,7 @@
Authors:
--------
Philipp Reisner <philipp.reisner at linbit.com>
- Lars Ellenberg <l.g.e at web.de>
+ Lars Ellenberg <lars.ellenberg at linbit.com>
#%package -n kernel%{?ksmp}-module-drbd
# I choose to have the kernelversion as part of the package name!
@@ -51,7 +51,7 @@
#Release: %{release}_%{krelver}
Group: System Environment/Kernel
Requires: %{name} = %{version}, /sbin/depmod
-# conflicts with the suse km_drbd package. use either theirs, or ours...
+# conflicts with the suse km_drbd package. use either theirs, or ours...
Conflicts: km_drbd
#%{?ksmp:Provides: kernel-module-drbd = %{version}-%{release}_%{krelver}}
@@ -153,8 +153,8 @@
fi
chkconfig --add drbd
-for i in `seq 0 15` ; do
- test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
+for i in `seq 0 15` ; do
+ test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
done
@@ -194,7 +194,7 @@
* Fri Dec 22 2006 15:19:10 +0200 Philipp Reisner <phil at linbit.com>
- drbd (8.0rc1-1)
* The drbd-peer-outdater got updated to work in multi node heartbeat
- clusters. (But we still not suceeded to get this into Heartbeat's
+ clusters. (But we still not suceeded to get this into Heartbeat's
repository accepted.)
* Fixed resync decission after a crash in a pri-pri cluster.
* Implemented the ping-timeout option for "sub-second" failover clusters.
@@ -217,7 +217,7 @@
* The request code was completely rewritten.
* The write conflict detection code for primary-primary is currently
broken, but will be fixed soon.
- * drbdsetup is no longer based on IOCTL but works now via
+ * drbdsetup is no longer based on IOCTL but works now via
netlink/connector.
* drbd_panic() is on its way out.
* A runtime configurable tracing framework got added.
@@ -241,7 +241,7 @@
* Fixes for 64bit kernel / 32 bit userland environments
* Fixes in the sys-v init script
* Renamed "--do-what-I-say" to "--overwrite-data-of-peer". Hopefully
- people now understand what this option does.
+ people now understand what this option does.
* Tue Apr 6 2006 17:53:56 +0200 Philipp Reisner <phil at linbit.com>
- drbd (8.0-pre2-1)
@@ -263,9 +263,9 @@
* Improved, tunable after-split-brain recovery strategies.
* Always verify all IDs used in the protocol that are used as pointers.
* Introduced the "outdate" disk state, and commands for managing it.
- * Introduced the "drbdmeta" command, and require the user to create
+ * Introduced the "drbdmeta" command, and require the user to create
meta-data explicitly.
- * Support for primary/primary (for OCFS2, GFS...)
+ * Support for primary/primary (for OCFS2, GFS...)
* Replaced the sync-groups with the sync-after mechanism.
* The "common" section in the configuration file.
* Replaced the generation counters (GCs) with data-generation-UUIDs
@@ -281,6 +281,6 @@
* Changed internal APIs so that missed writes of the meta-data super
block are reported as they happen.
* The http://usage.drbd.org sub project.
- * Rewrote the scanner/parser of drbd.conf. 10 times smaller/faster and
+ * Rewrote the scanner/parser of drbd.conf. 10 times smaller/faster and
easier to maintain.
* Asynchronous meta-data IO [ Code drop from the DRBD+ branch ]
Modified: trunk/scripts/Makefile
===================================================================
--- trunk/scripts/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,7 +1,10 @@
# Makefile for scripts
#
-# This file is part of drbd by Philipp Reisner
+# This file is part of DRBD by Philipp Reisner & Lars Ellenberg.
#
+# Copright 2001-2007 LINBIT Information Technologies
+# Philipp Reisner, Lars Ellenberg
+#
# 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)
Modified: trunk/scripts/drbd
===================================================================
--- trunk/scripts/drbd 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/drbd 2007-01-16 18:51:07 UTC (rev 2702)
@@ -3,9 +3,8 @@
# chkconfig: 345 70 8
# description: Loads and unloads the drbd module
#
-# complete rewrite from scratch by Philipp Reisner in March and April 2001
-# rewrite from scratch by Lars Ellenberg in June 2002
-# Jan 2003: Moved all the logic into a program written in C.
+# Copright 2001-2007 LINBIT Information Technologies
+# Philipp Reisner, Lars Ellenberg
#
### BEGIN INIT INFO
# Provides: drbd
@@ -34,8 +33,8 @@
{
[ -e "$PROC_DRBD" ] && return
- $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || {
- echo "Can not load the drbd module."$'\n'; exit 20
+ $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || {
+ echo "Can not load the drbd module."$'\n'; exit 20
}
# tell klogd to reload module symbol information ...
[ -e /var/run/klogd.pid ] && [ -x /sbin/klogd ] && /sbin/klogd -i
@@ -54,15 +53,15 @@
COMMANDS=`$DRBDADM -d adjust all` || exit 20
echo -n "[ "
- for CMD in $COMMANDS; do
- if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
- elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
+ for CMD in $COMMANDS; do
+ if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
+ elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
elif echo $CMD | grep -q net; then echo -n "n$N "; N=$(( N+1 ));
else echo echo -n ".. ";
fi
IFS=$IFS_O
- $CMD || {
- echo -e "\ncmd $CMD failed!"; exit 20
+ $CMD || {
+ echo -e "\ncmd $CMD failed!"; exit 20
}
IFS=$NEWLINE
done
@@ -73,7 +72,7 @@
# Just in case drbdadm want to display any errors in the configuration
# file, or we need to ask the user about registering this installation
-# at http://usage.drbd.org, we call drbdadm here without any IO
+# at http://usage.drbd.org, we call drbdadm here without any IO
# redirection.
$DRBDADM sh-nop
Modified: trunk/scripts/drbd.conf
===================================================================
--- trunk/scripts/drbd.conf 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/drbd.conf 2007-01-16 18:51:07 UTC (rev 2702)
@@ -21,23 +21,6 @@
# network is saturated; and so on ...)
#
-#
-# Upgrading from DRBD-0.6.x
-#
-# Using the size parameter in the disk section (was disk-size) is
-# no longer valid. The agreed disk size is now stored
-# in DRBD's non volatile meta data files.
-#
-# NOTE that if you do not have some dedicated partition to use for
-# the meta-data, you may use 'internal' meta-data.
-#
-# THIS HOWEVER WILL DESTROY THE LAST 128M
-# OF THE LOWER LEVEL DEVICE.
-#
-# So you better make sure you shrink the filesystem by 128M FIRST!
-# or by 132M just to be sure... :)
-#
-
skip {
As you can see, you can also comment chunks of text
with a 'skip[optional nonsense]{ skipped text }' section.
@@ -47,10 +30,10 @@
The basic format of option assignment is
<option name><linear whitespace><value>;
-
+
It should be obvious from the examples below,
but if you really care to know the details:
-
+
<option name> :=
valid options in the respective scope
<value> := <num>|<string>|<choice>|...
@@ -67,7 +50,7 @@
#
global {
# By default we load the module with a minor-count of 32. In case you
- # have more devices in your config, the module gets loaded with
+ # have more devices in your config, the module gets loaded with
# a minor-count that ensures that you have 10 minors spare.
# In case 10 spare minors are too little for you, you can set the
# minor-count exeplicit here. ( Note, in contrast to DRBD-0.7 an
@@ -77,7 +60,7 @@
# minor-count 64;
# The user dialog counts and displays the seconds it waited so
- # far. You might want to disable this if you have the console
+ # far. You might want to disable this if you have the console
# of your server connected to a serial terminal server with
# limited logging capacity.
# The Dialog will print the count each 'dialog-refresh' seconds,
@@ -147,24 +130,24 @@
# In case you have set the on-io-error option to "call-local-io-error",
# this script will get executed in case of a local IO error. It is
- # expected that this script will case a immediate failover in the
+ # expected that this script will case a immediate failover in the
# cluster.
local-io-error "echo O > /proc/sysrq-trigger ; halt -f";
- # Commands to run in case we need to downgrade the peer's disk
+ # Commands to run in case we need to downgrade the peer's disk
# state to "Outdated". Should be implemented by the superior
# communication possibilities of our cluster manager.
# The provided script uses ssh, and is for demonstration/development
# purposis.
# outdate-peer "/usr/lib/drbd/outdate-peer.sh on amd 192.168.22.11 192.168.23.11 on alf 192.168.22.12 192.168.23.12";
- #
- # Update: Now there is a solution that relies on heartbeat's
+ #
+ # Update: Now there is a solution that relies on heartbeat's
# communication layers. You should really use this.
- outdate-peer "/usr/sbin/drbd-peer-outdater";
+ outdate-peer "/usr/sbin/drbd-peer-outdater";
}
startup {
- # Wait for connection timeout.
+ # Wait for connection timeout.
# The init script blocks the boot process until the resources
# are connected. This is so when the cluster manager starts later,
# it does not see a resource with internal split-brain.
@@ -175,7 +158,7 @@
# Wait for connection timeout if this node was a degraded cluster.
# In case a degraded cluster (= cluster with only one node left)
- # is rebooted, this timeout value is used.
+ # is rebooted, this timeout value is used.
#
degr-wfc-timeout 120; # 2 minutes.
}
@@ -185,7 +168,7 @@
# "pass_on" -> Report the io-error to the upper layers.
# Primary -> report it to the mounted file system.
# Secondary -> ignore it.
- # "call-local-io-error"
+ # "call-local-io-error"
# -> Call the script configured by the name "local-io-error".
# "detach" -> The node drops its backing storage device, and
# continues in disk less mode.
@@ -238,7 +221,7 @@
# node exceeds bdev-threshold, we start to kick the backing device
# to start its request processing. This is an advanced tuning
# parameter to get more performance out of capable storage controlers.
- # Some controlers like to be kicked often, other controlers
+ # Some controlers like to be kicked often, other controlers
# deliver better performance when they are kicked less frequently.
# Set it to the value of max-buffers to get the least possible
# number of run_task_queue_disk() / q->unplug_fn(q) calls.
@@ -246,11 +229,11 @@
# unplug-watermark 128;
- # The highest number of data blocks between two write barriers.
+ # The highest number of data blocks between two write barriers.
# If you set this < 10 you might decrease your performance.
# max-epoch-size 2048;
- # if some block send times out this many times, the peer is
+ # if some block send times out this many times, the peer is
# considered dead, even if it still answers ping requests.
# ko-count 4;
@@ -263,10 +246,10 @@
# This enables peer authentication. Without this everybody
# on the network could connect to one of your DRBD nodes with
# a program that emulates DRBD's protocoll and could suck off
- # all your data.
+ # all your data.
# Specify one of the kernel's digest algorithms, e.g.:
# md5, sha1, sha256, sha512, wp256, wp384, wp512, michael_mic ...
- # an a shared secret.
+ # an a shared secret.
# Authentication is only done once after the TCP connection
# is establised, there are no disadvantages from using authentication,
# therefore I suggest to enable it in any case.
@@ -274,18 +257,18 @@
# shared-secret "FooFunFactory";
# In case the nodes of your cluster nodes see each other again, after
- # an split brain situation in which both nodes where primary
+ # an split brain situation in which both nodes where primary
# at the same time, you have two diverged versions of your data.
#
# In case both nodes are secondary you can control DRBD's
# auto recovery strategy by the "after-sb-0pri" options. The
- # default is to disconnect.
+ # default is to disconnect.
# "disconnect" ... No automatic resynchronisation, simply disconnect.
# "discard-younger-primary"
# Auto sync from the node that was primary before
# the split brain situation happened.
# "discard-older-primary"
- # Auto sync from the node that became primary
+ # Auto sync from the node that became primary
# as second during the split brain situation.
# "discard-least-changes"
# Auto sync from the node that touched more
@@ -296,9 +279,9 @@
# In one of the nodes is already primary, then the auto-recovery
# strategie is controled by the "after-sb-1pri" options.
- # "disconnect" ... always disconnect
+ # "disconnect" ... always disconnect
# "consensus" ... discard the version of the secondary if the outcome
- # of the "after-sb-0pri" algorithm would also destroy
+ # of the "after-sb-0pri" algorithm would also destroy
# the current secondary's data. Otherwise disconnect.
# "violently-as0p" Always take the decission of the "after-sb-0pri"
# algorithm. Even if that causes case an erratic change
@@ -308,7 +291,7 @@
# flag, _AND_ you really know what you are doing.
# This is DANGEROUS and MAY CRASH YOUR MACHINE if you
# have a FS mounted on the primary node.
- # "discard-secondary"
+ # "discard-secondary"
# discard the version of the secondary.
# "call-pri-lost-after-sb" Always honour the outcome of the "after-sb-0pri"
# algorithm. In case it decides the the current
@@ -321,23 +304,23 @@
# the "after-sb-2pri" option.
# "disconnect" ... Go to StandAlone mode on both sides.
# "violently-as0p" Always take the decission of the "after-sb-0pri".
- # "call-pri-lost-after-sb" ... Honor the outcome of the "after-sb-0pri"
+ # "call-pri-lost-after-sb" ... Honor the outcome of the "after-sb-0pri"
# algorithm and panic the other node.
after-sb-2pri disconnect;
- # To solve the cases when the outcome of the resync descissions is
+ # To solve the cases when the outcome of the resync descissions is
# incompatible to the current role asignment in the cluster.
# "disconnect" ... No automatic resynchronisation, simply disconnect.
- # "violently" .... Sync to the primary node is allowed, violating the
+ # "violently" .... Sync to the primary node is allowed, violating the
# assumption that data on a block device is stable
# for one of the nodes. DANGEROUS, DO NOT USE.
- # "call-pri-lost" Call the "pri-lost" helper program on one of the
+ # "call-pri-lost" Call the "pri-lost" helper program on one of the
# machines. This program is expected to reboot the
# machine. (I.e. make it secondary.)
rr-conflict disconnect;
- # DRBD-0.7's behaviour is equivalent to
+ # DRBD-0.7's behaviour is equivalent to
# after-sb-0pri discard-younger-primary;
# after-sb-1pri consensus;
# after-sb-2pri disconnect;
@@ -357,13 +340,13 @@
#
rate 10M;
- # Normally all devices are resynchronized parallel.
+ # Normally all devices are resynchronized parallel.
# To achieve better resynchronisation performance you should resync
# DRBD resources which have their backing storage on one physical
# disk sequentially. The express this use the "after" keyword.
after "r2";
- # Configures the size of the active set. Each extent is 4M,
+ # Configures the size of the active set. Each extent is 4M,
# 257 Extents ~> 1GB active set size. In case your syncer
# runs @ 10MB/sec, all resync after a primary's crash will last
# 1GB / ( 10MB/sec ) ~ 102 seconds ~ One Minute and 42 Seconds.
Modified: trunk/scripts/drbd.gentoo
===================================================================
--- trunk/scripts/drbd.gentoo 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/drbd.gentoo 2007-01-16 18:51:07 UTC (rev 2702)
@@ -19,8 +19,8 @@
start() {
ebegin "Starting DRBD"
# strange that gentoo thinks this should be done by an init script
- for i in `seq 0 15` ; do
- test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
+ for i in `seq 0 15` ; do
+ test -b /dev/drbd$i || mknod -m 0660 /dev/drbd$i b 147 $i;
done
${DRBDADM} up all
# /sbin/drbdadm wait-connect all
Modified: trunk/scripts/drbddisk
===================================================================
--- trunk/scripts/drbddisk 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/drbddisk 2007-01-16 18:51:07 UTC (rev 2702)
@@ -2,7 +2,8 @@
#
# This script is inteded to be used as resource script by heartbeat
#
-# Jan 2003 by Philipp Reisner.
+# Copright 2003-2007 LINBIT Information Technologies
+# Philipp Reisner, Lars Ellenberg
#
###
Modified: trunk/scripts/get_uts_release.sh
===================================================================
--- trunk/scripts/get_uts_release.sh 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/get_uts_release.sh 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,5 +1,5 @@
#!/bin/bash
-{
+{
for x in include/linux/{utsrelease,version}.h;
do
for d in $KDIR $O;
Modified: trunk/scripts/outdate-peer.sh
===================================================================
--- trunk/scripts/outdate-peer.sh 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/outdate-peer.sh 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,7 +1,7 @@
#!/bin/bash
#
# outdate-peer.sh
-# This file is part of drbd by Philipp Reisner / Lars Ellenberg.
+# This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
#
#
@@ -24,7 +24,7 @@
# Start a line with from="10.9.9.181,10.99.99.1" [content of id_dsa.pub]
# Put the IPs of you first machine here, also the id_dsa.pub
# is from the first machine All needs to be in a single line.
-#
+#
# 3. ssh from the first machine to the second one, do this for all
# IP addresses of the second machine. When doing this the first
# time it asks you if it should ad the fingerprint to the list
@@ -45,19 +45,19 @@
TIMEOUT=6
for P in "$@"; do
- if [ "$P" = "on" ]; then
+ if [ "$P" = "on" ]; then
EXP_HOST_NAME=1
EXP_PEER_IP=0
EXP_OWN_IP=0
else
- if [ "$EXP_PEER_IP" = "1" ]; then
+ if [ "$EXP_PEER_IP" = "1" ]; then
PEER_IP="$PEER_IP $P"
fi;
- if [ "$EXP_OWN_IP" = "1" ]; then
+ if [ "$EXP_OWN_IP" = "1" ]; then
OWN_IP="$OWN_IP $P"
fi;
- if [ "$EXP_HOST_NAME" = "1" ]; then
- if [ "$P" != `uname -n` ]; then
+ if [ "$EXP_HOST_NAME" = "1" ]; then
+ if [ "$P" != `uname -n` ]; then
EXP_PEER_IP=1
else
EXP_OWN_IP=1
Modified: trunk/scripts/patch-kernel
===================================================================
--- trunk/scripts/patch-kernel 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/scripts/patch-kernel 2007-01-16 18:51:07 UTC (rev 2702)
@@ -9,17 +9,17 @@
#
# Copyright (C) 2003-2006 LINBIT Information Technologies GmbH
# http://www.linbit.com
-#
+#
# This program 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
# of the License, or (at your option) any later version.
-#
+#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -104,7 +104,7 @@
grep "HLIST_HEAD_INIT" $KERNEL/include/linux/list.h >/dev/null &&
rm $DRBD_SUB/hlist.h
-# disable __arch_um__ to_virt() hack
+# disable __arch_um__ to_virt() hack
sed -e 's/^#ifdef __arch_um__/#if 0/' \
< $DRBD/drbd/drbd_receiver.c > $DRBD_SUB/drbd_receiver.c
@@ -147,7 +147,7 @@
patch_Kconfig < $KERNEL_BASE/$f > $DRBD_BASE/$f
done
-#
+#
# finally: Create diff!
#
if diff -uNrp $KERNEL_BASE $DRBD_BASE ; then
Modified: trunk/testing/access_and_verify.c
===================================================================
--- trunk/testing/access_and_verify.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/testing/access_and_verify.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,10 +1,11 @@
/*
access_and_verify.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2003, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/testing/show_size.c
===================================================================
--- trunk/testing/show_size.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/testing/show_size.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,10 +1,11 @@
/*
show_size.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2002, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2002-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2002-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/tools/README
===================================================================
--- trunk/tools/README 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/tools/README 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
1) compile
-copy this directory into heartbeat tools directory and compile it
+copy this directory into heartbeat tools directory and compile it
with heartbeat.
2) prepare drbdmeta
@@ -23,12 +23,12 @@
---
4) Configure DRBD to use this facility
-
+
resource rX {
...
handlers {
...
- outdate-peer "/usr/sbin/drbd-peer-outdater";
+ outdate-peer "/usr/sbin/drbd-peer-outdater";
}
disk {
...
Modified: trunk/tools/dopd.c
===================================================================
--- trunk/tools/dopd.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/tools/dopd.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
/* $Id$ */
/* drbd outdate peer daemon
- * Copyright (C) 2006 LINBIT <http://www.linbit.com/>
+ * Copyright (C) 2006-2007 LINBIT <http://www.linbit.com/>
* Written by Rasto Levrinc <rasto at linbit.com>
*
* based on ipfail.c and attrd.c
@@ -81,7 +81,7 @@
ha_msg_add(msg, F_ORIG, node_name);
ha_msg_add(msg, F_DOPD_RES, drbd_resource);
- crm_debug("sending [start_outdate res: %s] to node: %s",
+ crm_debug("sending [start_outdate res: %s] to node: %s",
drbd_resource, drbd_peer);
dopd_cluster_conn->llc_ops->sendnodemsg(dopd_cluster_conn, msg, drbd_peer);
ha_msg_del(msg);
@@ -149,7 +149,7 @@
}
/* msg_outdate_rc()
- * got outdate_rc message with return code from other node. Send the
+ * got outdate_rc message with return code from other node. Send the
* return code to the outdater client.
*/
void
Modified: trunk/tools/dopd.h
===================================================================
--- trunk/tools/dopd.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/tools/dopd.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,19 +1,18 @@
/* $Id$ */
/* drbd outdate peer daemon
- * Copyright (C) 2006 LINBIT <http://www.linbit.com/>
- *
+ * Copyright (C) 2006-2007 LINBIT <http://www.linbit.com/>
* Written by Rasto Levrinc <rasto at linbit.at>
*
* This library 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.1 of the License, or (at your option) any later version.
- *
+ *
* This software 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 this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Modified: trunk/tools/drbd-peer-outdater.c
===================================================================
--- trunk/tools/drbd-peer-outdater.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/tools/drbd-peer-outdater.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,7 +1,6 @@
/* $Id$ */
/* drbd-peer-outdater
- * Copyright (C) 2006 LINBIT <http://www.linbit.com/>
- *
+ * Copyright (C) 2006-2007 LINBIT <http://www.linbit.com/>
* Written by Rasto Levrinc <rasto at linbit.com>
*
* based on attrd
Modified: trunk/user/Makefile
===================================================================
--- trunk/user/Makefile 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/Makefile 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,6 +1,6 @@
# Makefile for drbd.o
#
-# This file is part of drbd by Philipp Reisner
+# This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
#
# drbd is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,13 +37,13 @@
all: drbdadm drbdmeta drbdsetup
drbd_buildtag.c: ../drbd/drbd_buildtag.c
- cp $^ $@
+ cp $^ $@
drbd_strings.c: ../drbd/drbd_strings.c
- cp $^ $@
+ cp $^ $@
drbdadm: $(drbdadm-obj)
- $(CC) -o $@ $^
+ $(CC) -o $@ $^
drbdadm_scanner.c: drbdadm_scanner.fl drbdadm_parser.h
flex -s -odrbdadm_scanner.c drbdadm_scanner.fl
@@ -54,10 +54,10 @@
# for debug: flex -d -s -odrbdadm_scanner.c drbdadm_scanner.fl
drbdsetup: $(drbdsetup-obj)
- $(CC) -o $@ $^
+ $(CC) -o $@ $^
drbdmeta: $(drbdmeta-obj)
- $(CC) -o $@ $^
+ $(CC) -o $@ $^
clean:
rm -f drbdadm_scanner.c drbdmeta_scanner.c
@@ -87,11 +87,11 @@
drbdsetup.o: drbdtool_common.h ../drbd/linux/drbd_limits.h
drbdsetup.o: ../drbd/linux/drbd_tag_magic.h ../drbd/linux/drbd.h
drbdsetup.o: ../drbd/linux/drbd_config.h ../drbd/linux/drbd_nl.h
-drbdtool_common.o: drbdtool_common.h
+drbdtool_common.o: drbdtool_common.h
drbdadm_main.o: drbdtool_common.h drbdadm.h
drbdadm_adjust.o: drbdtool_common.h drbdadm.h
drbdadm_parser.o: drbdtool_common.h drbdadm.h ../drbd/linux/drbd_limits.h
-drbdadm_scanner.o: drbdadm.h drbdadm_parser.h
+drbdadm_scanner.o: drbdadm.h drbdadm_parser.h
drbdsetup.o: drbdtool_common.h ../drbd/linux/drbd_limits.h
-drbdmeta.o: drbdtool_common.h drbd_endian.h
+drbdmeta.o: drbdtool_common.h drbd_endian.h
drbdadm_usage_cnt.o: drbdadm.h drbd_endian.h
Modified: trunk/user/drbdadm.h
===================================================================
--- trunk/user/drbdadm.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -40,7 +40,7 @@
UC_NO,
UC_ASK,
};
-
+
struct d_globals
{
int disable_io_hints;
@@ -143,9 +143,9 @@
freed automatically */
/*
- // This is the nicer version, that does not need the ss_buffer.
+ // This is the nicer version, that does not need the ss_buffer.
// But it only works with very new glibcs.
-
+
#define ssprintf(...) \
({ int _ss_size = snprintf(0, 0, ##__VA_ARGS__); \
char *_ss_ret = __builtin_alloca(_ss_size+1); \
Modified: trunk/user/drbdadm_adjust.c
===================================================================
--- trunk/user/drbdadm_adjust.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_adjust.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,10 +1,11 @@
/*
drbdadm_adjust.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2003-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2003-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2003-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2003-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/user/drbdadm_main.c
===================================================================
--- trunk/user/drbdadm_main.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_main.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,11 +1,11 @@
/*
drbdadm_main.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2002-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2002-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2002-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 2002-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -140,7 +140,7 @@
{
struct deferred_cmd *d;
- if( (d = malloc(sizeof(struct deferred_cmd))) == NULL)
+ if( (d = malloc(sizeof(struct deferred_cmd))) == NULL)
{
perror("malloc");
exit(E_exec_error);
@@ -159,7 +159,7 @@
int rv;
if(d == NULL) return 0;
- if(d->next == NULL)
+ if(d->next == NULL)
{
rv = d->function(d->res,d->arg);
free(d);
@@ -175,8 +175,8 @@
int run_dcmds(void)
{
- return _run_dcmds(deferred_cmds[0]) ||
- _run_dcmds(deferred_cmds[1]) ||
+ return _run_dcmds(deferred_cmds[0]) ||
+ _run_dcmds(deferred_cmds[1]) ||
_run_dcmds(deferred_cmds[2]);
}
@@ -300,7 +300,7 @@
dump_options("syncer",common->sync_options);
dump_options("startup",common->startup_options);
dump_options("handlers",common->handlers);
- --indent; printf("}\n\n");
+ --indent; printf("}\n\n");
}
static void dump_host_info(struct d_host_info* hi)
@@ -743,7 +743,7 @@
int rv;
rv=adm_generic(res,cmd,SLEEPS_SHORT|SUPRESS_STDERR);
- if(rv == 17) return rv;
+ if(rv == 17) return rv;
// 17 returned by drbdsetup outdate, if it is already primary.
if( rv || dry_run ) {
@@ -877,7 +877,7 @@
argv[argc++]=0;
rv = m_system(argv,SLEEPS_FOREVER);
-
+
return rv;
}
@@ -886,7 +886,7 @@
struct d_resource *res,*t;
int mm;
if(strncmp(id,"minor-",6)) return NULL;
-
+
mm = m_strtoll(id+6,1);
for_each_resource(res,t,config) {
@@ -977,7 +977,7 @@
exit(E_exec_error);
}
} while(pr == -1);
-
+
if( pr == 1 ) { // Input available.
rr = read(fileno(stdin),s,size-1);
if(rr == -1) {
@@ -1153,7 +1153,7 @@
print_cmds(3);
printf("\nThese commands ought to be used by experts and developers\n\n");
-
+
print_cmds(4);
printf("\n");
@@ -1595,7 +1595,7 @@
if ( optind == argc ) print_usage_and_exit(0);
- while(argv[optind][0]=='-' || argv[optind][0]==':' ||
+ while(argv[optind][0]=='-' || argv[optind][0]==':' ||
isdigit(argv[optind][0]) ) {
setup_opts[soi++]=argv[optind++];
if (optind == argc) print_usage_and_exit(0);
Modified: trunk/user/drbdadm_parser.c
===================================================================
--- trunk/user/drbdadm_parser.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_parser.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,11 +1,11 @@
/*
drbdadm_parser.c a hand crafted parser
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2006, Philipp Reisner <philipp.reisner at linbit.com>
- Copyright (C) 2006, Lars Ellenberg <lars.ellenberg at linbit.com>
- Copyright (C) 2006, LINBIT Information Technologies GmbH
+ Copyright (C) 2006-2007, LINBIT Information Technologies GmbH
+ Copyright (C) 2006-2007, Philipp Reisner <philipp.reisner at linbit.com>
+ Copyright (C) 2006-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -229,7 +229,7 @@
}
fprintf(stderr, "%s:%u: Parse error: '%s' expected,\n\t"
"but got '%s' (TK %d)\n",
- config_file, line,
+ config_file, line,
tmp[0] ? tmp : exp, yytext, got);
exit(E_config_invalid);
}
@@ -535,7 +535,7 @@
res->disk_options = parse_options(TK_DISK_SWITCH,
TK_DISK_OPTION);
break;
- case TK_NET:
+ case TK_NET:
check_uniq("net section", "%s:net", res->name);
res->net_options = parse_options(TK_NET_SWITCH,
TK_NET_OPTION);
@@ -554,8 +554,8 @@
check_uniq("handlers section", "%s:handlers", res->name);
res->handlers = parse_options(0, TK_HANDLER_OPTION);
break;
- case '}':
- case 0:
+ case '}':
+ case 0:
return res;
default:
pe_expected_got("protocol | on | disk | net | syncer |"
Modified: trunk/user/drbdadm_parser.h
===================================================================
--- trunk/user/drbdadm_parser.h 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_parser.h 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,10 +1,11 @@
/*
drbdadm_parser.h a hand crafted parser
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2006-2007, LINBIT Information Technologies GmbH
+ Copyright (C) 2006-2007, Philipp Reisner <philipp.reisner at linbit.com>
+ Copyright (C) 2006-2007, Lars Ellenberg <lars.ellenberg at 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
Modified: trunk/user/drbdadm_scanner.fl
===================================================================
--- trunk/user/drbdadm_scanner.fl 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_scanner.fl 2007-01-16 18:51:07 UTC (rev 2702)
@@ -15,7 +15,7 @@
#endif
#define CP yylval.txt = strdup(yytext); yylval.rc = R_NO_CHECK
-#define RC(N) yylval.rc = R_ ## N
+#define RC(N) yylval.rc = R_ ## N
#define YY_NO_UNPUT 1
static void yyunput (int c, register char * yy_bp ) __attribute((unused));
@@ -77,9 +77,9 @@
cram-hmac-alg { DP; CP; return TK_NET_OPTION; }
shared-secret { DP; CP; return TK_NET_OPTION; }
max-epoch-size { DP; CP; RC(MAX_EPOCH_SIZE); return TK_NET_OPTION;}
-after-sb-[012]pri { DP; CP; return TK_NET_OPTION; }
-rr-conflict { DP; CP; return TK_NET_OPTION; }
-ping-timeout { DP; CP; return TK_NET_OPTION; }
+after-sb-[012]pri { DP; CP; return TK_NET_OPTION; }
+rr-conflict { DP; CP; return TK_NET_OPTION; }
+ping-timeout { DP; CP; return TK_NET_OPTION; }
unplug-watermark { DP; CP; return TK_NET_OPTION; }
allow-two-primaries { DP; CP; return TK_NET_SWITCH; }
rate { DP; CP; RC(RATE); return TK_SYNCER_OPTION; }
Modified: trunk/user/drbdadm_usage_cnt.c
===================================================================
--- trunk/user/drbdadm_usage_cnt.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdadm_usage_cnt.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,14 +1,12 @@
/*
drbdadm_usage_cnt.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2006-2007, LINBIT Information Technologies GmbH
+ Copyright (C) 2006-2007, Philipp Reisner <philipp.reisner at linbit.com>
+ Copyright (C) 2006-2007, Lars Ellenberg <lars.ellenberg at linbit.com>
- Copyright (C) 2006, Lars Ellenberg <l.g.e at web.de>
- contributions.
-
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)
@@ -71,7 +69,7 @@
fd = open("/proc/drbd",O_RDONLY);
if( fd == -1) return 0;
-
+
buffer = malloc(SLURP_SIZE);
if(!buffer) return 0;
@@ -80,7 +78,7 @@
free(buffer);
return 0;
}
-
+
buffer[rr]=0;
close(fd);
@@ -96,7 +94,7 @@
while(sget_token(token,40,&text) != EOF) {
switch(ex) {
- case begin:
+ case begin:
if(!strcmp(token,"plus")) plus = 1;
if(!strcmp(token,"SVN")) ex = f_svn;
break;
@@ -104,7 +102,7 @@
if(!strcmp(token,"Revision:")) ex = f_rev;
break;
case f_rev:
- svn_rev = atol(token);
+ svn_rev = atol(token);
goto out;
}
}
@@ -168,7 +166,7 @@
if( fd == -1) {
return 0;
}
-
+
if( read(fd,&on_disk, sizeof(on_disk)) != sizeof(on_disk)) {
close(fd);
return 0;
@@ -185,7 +183,7 @@
/**
* insert_usage_with_socket:
- *
+ *
* Return codes:
*
* 0 - success
@@ -416,7 +414,7 @@
}
buffer[rr]=0;
close(pipes[0]);
-
+
waitpid(pid,0,0);
return buffer;
Modified: trunk/user/drbdmeta.c
===================================================================
--- trunk/user/drbdmeta.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdmeta.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,10 +1,11 @@
/*
drbdmeta.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2004, Philipp Reisner <philipp.reisner at linbit.com>.
- Initial author.
+ Copyright (C) 2004-2007, LINBIT Information Technologies GmbH
+ Copyright (C) 2004-2007, Philipp Reisner <philipp.reisner at linbit.com>
+ Copyright (C) 2004-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -547,7 +548,7 @@
be_s32 bm_offset; /* signed sector offset to the bitmap, from here */
be_u32 bm_bytes_per_bit;
be_u32 reserved_u32[4];
-
+
char reserved[8 * 512 - (8*(UUID_SIZE+3)+4*11)];
};
@@ -851,7 +852,7 @@
if ((i & 3) == 0) {
printf_bm_eol(i);
- // RLL encoding
+ // RLL encoding
for (j = i+1; j < n; j++) {
if(bm[i].le != bm[j].le) break;
}
@@ -903,7 +904,7 @@
cfg->md_mmaped_length = size;
cfg->on_disk.md =
- MMAP(cfg->on_disk.md, cfg->md_mmaped_length, PROT_READ | PROT_WRITE, MAP_SHARED, cfg->md_fd,
+ MMAP(cfg->on_disk.md, cfg->md_mmaped_length, PROT_READ | PROT_WRITE, MAP_SHARED, cfg->md_fd,
cfg->md_offset);
/* in case this is internal meta data, mmap first <some>KB of device,
@@ -963,7 +964,7 @@
void md_erase_sb(struct format *cfg,
u64 (*md_get_byte_offset) (struct format *))
{
- /* in case these are internal meta data, we need to
+ /* in case these are internal meta data, we need to
make sure that there is no v08 superblock at the end
of the meta data area. */
@@ -971,7 +972,7 @@
struct format cfg_f;
u64 offset;
int bw;
-
+
if(cfg->md_index == DRBD_MD_INDEX_INTERNAL ||
cfg->md_index == DRBD_MD_INDEX_FLEX_INT ) {
memset(zero_sector,0,512);
@@ -1466,7 +1467,7 @@
int v07_md_open(struct format *cfg)
{
- return v07_style_md_open(cfg,
+ return v07_style_md_open(cfg,
&v07_md_get_byte_offset,
sizeof(struct md_on_disk_07));
}
@@ -1569,7 +1570,7 @@
int v08_md_open(struct format *cfg)
{
- return v07_style_md_open(cfg,
+ return v07_style_md_open(cfg,
&v08_md_get_byte_offset,
sizeof(struct md_on_disk_08));
}
@@ -1827,7 +1828,7 @@
EXP(';');
while(times--) bm[i++] = value;
break;
- case '}':
+ case '}':
goto break_loop;
default:
md_parse_error("TK_U64, TK_NUM or }");
@@ -1864,9 +1865,9 @@
// The MDF Flags are (nearly) the same in 07 and 08
cfg->md.flags = cfg->md.gc[Flags];
- /*
+ /*
*/
- cfg->md.uuid[Current] =
+ cfg->md.uuid[Current] =
(u64)(cfg->md.gc[HumanCnt] & 0xffff) << 48 |
(u64)(cfg->md.gc[TimeoutCnt] & 0xffff) << 32 |
(u64)((cfg->md.gc[ConnectedCnt]+cfg->md.gc[ArbitraryCnt])
@@ -2290,7 +2291,7 @@
printf(X64(016)"\n",cfg->md.device_uuid);
- return cfg->ops->close(cfg);
+ return cfg->ops->close(cfg);
}
int meta_write_dev_uuid(struct format *cfg, char **argv, int argc)
Modified: trunk/user/drbdmeta_scanner.fl
===================================================================
--- trunk/user/drbdmeta_scanner.fl 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdmeta_scanner.fl 2007-01-16 18:51:07 UTC (rev 2702)
@@ -27,7 +27,7 @@
{WS}
{COMMENT}
{OP} DP; return yytext[0];
-{STRING} unescape(); yylval.txt=yytext; DP; return TK_STRING;
+{STRING} unescape(); yylval.txt=yytext; DP; return TK_STRING;
{U64} yylval.u64 = strto_u64(yytext, NULL, 16); DP; return TK_U64;
{U32} yylval.u64 = strto_u64(yytext, NULL, 16); DP; return TK_U32;
{NUM} yylval.u64 = strto_u64(yytext, NULL, 10); DP; return TK_NUM;
Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdsetup.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -1,11 +1,11 @@
/*
drbdsetup.c
- This file is part of drbd by Philipp Reisner.
+ This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
- Copyright (C) 1999-2006, Philipp Reisner <philipp.reisner at linbit.com>.
- Copyright (C) 2002-2006, Lars Ellenberg <lars.ellenberg at linbit.com>.
- Copyright (C) 2001-2006, LINBIT Information Technologies GmbH.
+ Copyright (C) 2001-2007, LINBIT Information Technologies GmbH.
+ Copyright (C) 1999-2007, Philipp Reisner <philipp.reisner at linbit.com>.
+ Copyright (C) 2002-2007, Lars Ellenberg <lars.ellenberg at 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
@@ -72,7 +72,7 @@
const char* name;
const enum drbd_tags tag;
int (*convert_function)(struct drbd_argument *,
- struct drbd_tag_list *,
+ struct drbd_tag_list *,
char *);
};
@@ -111,7 +111,7 @@
struct drbd_option *options;
} cp; // for generic_config_cmd, config_usage
struct {
- int (*show_function)(struct drbd_cmd *, int,
+ int (*show_function)(struct drbd_cmd *, int,
unsigned short* );
} gp; // for generic_get_cmd, get_usage
struct {
@@ -127,7 +127,7 @@
int open_cn();
int send_cn(int sk_nl, struct nlmsghdr* nl_hdr, int size);
int receive_cn(int sk_nl, struct nlmsghdr* nl_hdr, int size, int timeout_ms);
-int call_drbd(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
+int call_drbd(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
int size, int timeout_ms);
void close_cn(int sk_nl);
@@ -140,7 +140,7 @@
int generic_get_cmd(struct drbd_cmd *cm, int minor, int argc, char **argv);
int events_cmd(struct drbd_cmd *cm, int minor, int argc,char **argv);
-// usage functions
+// usage functions
void config_usage(struct drbd_cmd *cm, int);
void get_usage(struct drbd_cmd *cm, int);
void events_usage(struct drbd_cmd *cm, int);
@@ -226,7 +226,7 @@
struct option wait_cmds_options[] = {
{ "wfc-timeout",required_argument, 0, 't' },
{ "degr-wfc-timeout",required_argument,0,'d'},
- { 0, 0, 0, 0 }
+ { 0, 0, 0, 0 }
};
#define EN(N,U) \
@@ -237,8 +237,8 @@
conv_handler, show_handler, handler_opt_usage, \
{ .handler_param = { N, ARRY_SIZE(N), \
DRBD_ ## D ## _DEF } }
-#define EB conv_bit, show_bit, bit_opt_usage, { }
-#define ES conv_string, show_string, string_opt_usage, { }
+#define EB conv_bit, show_bit, bit_opt_usage, { }
+#define ES conv_string, show_string, string_opt_usage, { }
#define CLOSE_OPTIONS { NULL,0,0,NULL,NULL,NULL, { } }
#define F_CONFIG_CMD generic_config_cmd, config_usage
@@ -415,7 +415,7 @@
}
printf("# (%2d) %16s = ",tag_nr,string);
switch(tag_type(tag)) {
- case TT_INTEGER:
+ case TT_INTEGER:
integer = *(int*)tlc;
printf("(integer) %d",integer);
break;
@@ -443,10 +443,10 @@
struct drbd_tag_list *create_tag_list(int size)
{
struct drbd_tag_list *tl;
-
+
tl = malloc(sizeof(struct drbd_tag_list));
tl->nl_header = malloc(NLMSG_SPACE( sizeof(struct cn_msg) +
- sizeof(struct drbd_nl_cfg_req) +
+ sizeof(struct drbd_nl_cfg_req) +
size) );
tl->cn_header = NLMSG_DATA(tl->nl_header);
tl->drbd_p_header = (struct drbd_nl_cfg_req*) tl->cn_header->data;
@@ -459,7 +459,7 @@
void add_tag(struct drbd_tag_list *tl, int tag, void *data, int data_len)
{
- if( (tl->tag_list_cpos - tl->tag_list_start) + data_len
+ if( (tl->tag_list_cpos - tl->tag_list_start) + data_len
> tl->tag_size ) {
fprintf(stderr, "Tag list size exceeded!\n");
exit(20);
@@ -496,10 +496,10 @@
fprintf(stderr, "%s is not a block device!\n", arg);
return 20;
}
-
+
close(device_fd);
- add_tag(tl,ad->tag,arg,strlen(arg)+1); // include the null byte.
+ add_tag(tl,ad->tag,arg,strlen(arg)+1); // include the null byte.
return 0;
}
@@ -647,7 +647,7 @@
return 0;
}
}
-
+
fprintf(stderr, "Handler not known\n");
return 20;
}
@@ -666,7 +666,7 @@
while(od && od->name) {
buffer[i].name = od->name;
- buffer[i].has_arg = tag_type(od->tag) == TT_BIT ?
+ buffer[i].has_arg = tag_type(od->tag) == TT_BIT ?
no_argument : required_argument ;
buffer[i].flag = NULL;
buffer[i].val = od->short_name;
@@ -675,7 +675,7 @@
}
od++;
}
-
+
// The two omnipresent options:
buffer[i].name = "set-defaults";
buffer[i].has_arg = 0;
@@ -731,7 +731,7 @@
"unknown error.\n", err_no);
rv = 11;
} else if (err_no > SS_TwoPrimaries) {
- // Ignore SS_Success, SS_NothingToDo, SS_CW_Success...
+ // Ignore SS_Success, SS_NothingToDo, SS_CW_Success...
} else {
fprintf(stderr,"State change failed: (%d) %s\n",
err_no, set_st_err_name(err_no));
@@ -819,7 +819,7 @@
const unsigned char def_unit = od->numeric_param.default_unit;
switch(tag_type(*tp++)) {
- case TT_INTEGER:
+ case TT_INTEGER:
ASSERT( *tp++ == sizeof(int) );
val = *(int*)tp;
break;
@@ -827,7 +827,7 @@
ASSERT( *tp++ == sizeof(__u64) );
val = *(__u64*)tp;
break;
- default:
+ default:
ASSERT(0);
val=0;
}
@@ -901,7 +901,7 @@
}
-int consume_tag_blob(enum drbd_tags tag, unsigned short *tlc,
+int consume_tag_blob(enum drbd_tags tag, unsigned short *tlc,
char** val, unsigned int* len)
{
unsigned short *tp;
@@ -923,7 +923,7 @@
*tp++ = TT_REMOVED;
if( *tp++ > 0 )
*val = (char*)tp;
- else
+ else
*val = "";
return 1;
}
@@ -956,7 +956,7 @@
return 0;
}
-int generic_get_cmd(struct drbd_cmd *cm, int minor, int argc,
+int generic_get_cmd(struct drbd_cmd *cm, int minor, int argc,
char **argv __attribute((unused)))
{
char buffer[ 4096 ];
@@ -1053,8 +1053,8 @@
return 0;
}
-int state_scmd(struct drbd_cmd *cm __attribute((unused)),
- int minor __attribute((unused)),
+int state_scmd(struct drbd_cmd *cm __attribute((unused)),
+ int minor __attribute((unused)),
unsigned short *rtl)
{
drbd_state_t state;
@@ -1063,8 +1063,8 @@
return 0;
}
-int cstate_scmd(struct drbd_cmd *cm __attribute((unused)),
- int minor __attribute((unused)),
+int cstate_scmd(struct drbd_cmd *cm __attribute((unused)),
+ int minor __attribute((unused)),
unsigned short *rtl)
{
drbd_state_t state;
@@ -1073,8 +1073,8 @@
return 0;
}
-int dstate_scmd(struct drbd_cmd *cm __attribute((unused)),
- int minor __attribute((unused)),
+int dstate_scmd(struct drbd_cmd *cm __attribute((unused)),
+ int minor __attribute((unused)),
unsigned short *rtl)
{
drbd_state_t state;
@@ -1083,8 +1083,8 @@
return 0;
}
-int uuids_scmd(struct drbd_cmd *cm,
- int minor __attribute((unused)),
+int uuids_scmd(struct drbd_cmd *cm,
+ int minor __attribute((unused)),
unsigned short *rtl)
{
__u64 *uuids;
@@ -1129,7 +1129,7 @@
int rv;
if(argc > 1) {
- fprintf(stderr,"Ignoring excess arguments\n");
+ fprintf(stderr,"Ignoring excess arguments\n");
}
cm = find_cmd_by_name("secondary");
@@ -1192,14 +1192,14 @@
return 1;
}
-int w_synced_state(unsigned int seq __attribute((unused)),
+int w_synced_state(unsigned int seq __attribute((unused)),
struct drbd_nl_cfg_reply *reply)
{
drbd_state_t state;
if(reply->packet_type == P_get_state) {
if(consume_tag_int(T_state_i,reply->tag_list,(int*)&state.i)) {
- if(state.conn == Connected || state.conn < Unconnected )
+ if(state.conn == Connected || state.conn < Unconnected )
return 0;
} else fprintf(stderr,"Missing tag !?\n");
}
@@ -1218,16 +1218,16 @@
int unfiltered=0, all_devices=0;
int wfc_timeout=0, degr_wfc_timeout=0,timeout_ms;
struct timeval before,after;
-
+
lo = cm->ep.options;
while( (c=getopt_long(argc,argv,make_optstring(lo,0),lo,0)) != -1 ) {
switch(c) {
case 'u': unfiltered=1; break;
case 'a': all_devices=1; break;
- case 't':
+ case 't':
wfc_timeout=m_strtoll(optarg,1);
- if(DRBD_WFC_TIMEOUT_MIN > wfc_timeout ||
+ if(DRBD_WFC_TIMEOUT_MIN > wfc_timeout ||
wfc_timeout > DRBD_WFC_TIMEOUT_MAX) {
fprintf(stderr, "wfc_timeout => %d"
" out of range [%d..%d]\n",
@@ -1238,7 +1238,7 @@
break;
case 'd':
degr_wfc_timeout=m_strtoll(optarg,1);
- if(DRBD_DEGR_WFC_TIMEOUT_MIN > degr_wfc_timeout ||
+ if(DRBD_DEGR_WFC_TIMEOUT_MIN > degr_wfc_timeout ||
degr_wfc_timeout > DRBD_DEGR_WFC_TIMEOUT_MAX) {
fprintf(stderr, "degr_wfc_timeout => %d"
" out of range [%d..%d]\n",
@@ -1293,7 +1293,7 @@
reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
// dump_tag_list(reply->tag_list);
-
+
if(!unfiltered && cn_reply->seq <= seq) continue;
seq = cn_reply->seq;
@@ -1366,7 +1366,7 @@
if(brief) col += snprintf(line+col, maxcol-col, " [args...]");
else {
while (args->name) {
- col += snprintf(line+col, maxcol-col, " %s",
+ col += snprintf(line+col, maxcol-col, " %s",
args->name);
args++;
}
@@ -1486,7 +1486,7 @@
}
my_nla.nl_family = AF_NETLINK;
- my_nla.nl_groups = -1; //CN_IDX_DRBD;
+ my_nla.nl_groups = -1; //CN_IDX_DRBD;
my_nla.nl_pid = getpid();
err = bind(sk_nl, (struct sockaddr *)&my_nla, sizeof(my_nla));
@@ -1558,7 +1558,7 @@
return rr;
}
-int receive_reply_cn(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
+int receive_reply_cn(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
int size, int timeout_ms)
{
struct cn_msg *request_cn_hdr;
@@ -1575,7 +1575,7 @@
reply_cn_hdr->ack == request_cn_hdr->ack+1 ) return rr;
/* printf("INFO: got other message \n"
"got seq: %d ; ack %d \n"
- "exp seq: %d ; ack %d \n",
+ "exp seq: %d ; ack %d \n",
reply_cn_hdr->seq,reply_cn_hdr->ack,
request_cn_hdr->seq,request_cn_hdr->ack); */
}
@@ -1583,11 +1583,11 @@
return rr;
}
-int call_drbd(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
+int call_drbd(int sk_nl, struct drbd_tag_list *tl, struct nlmsghdr* nl_hdr,
int size, int timeout_ms)
{
int rr;
- prepare_nl_header(tl->nl_header, (char*)tl->tag_list_cpos -
+ prepare_nl_header(tl->nl_header, (char*)tl->tag_list_cpos -
(char*)tl->nl_header);
rr = send(sk_nl,tl->nl_header,tl->nl_header->nlmsg_len,0);
Modified: trunk/user/drbdtool_common.c
===================================================================
--- trunk/user/drbdtool_common.c 2007-01-16 18:35:17 UTC (rev 2701)
+++ trunk/user/drbdtool_common.c 2007-01-16 18:51:07 UTC (rev 2702)
@@ -18,7 +18,7 @@
#include "drbdtool_common.h"
-char* ppsize(char* buf, size_t size)
+char* ppsize(char* buf, size_t size)
{
// Needs 9 bytes at max.
static char units[] = { 'K','M','G','T' };
@@ -81,7 +81,7 @@
break;
case 's':
- shift = -9; // sectors
+ shift = -9; // sectors
break;
/*
@@ -340,7 +340,7 @@
" | +--< Bitmap's base data generation UUID >-\n"
" | | +--< younger historiy UUID >-\n"
" | | | +-< older history >-\n"
-" V V V V\n");
+" V V V V\n");
dt_print_uuids(uuid, flags);
printf(
" ^ ^ ^ ^ ^ ^\n"
@@ -431,5 +431,5 @@
fprintf(stderr,"Reading from /dev/urandom failed\n");
exit(20);
}
- close(fd);
+ close(fd);
}
More information about the drbd-cvs
mailing list