[DRBD-cvs] r1511 - in trunk: . drbd
svn at svn.drbd.org
svn at svn.drbd.org
Fri Aug 27 13:53:11 CEST 2004
Author: lars
Date: 2004-08-27 13:53:06 +0200 (Fri, 27 Aug 2004)
New Revision: 1511
Modified:
trunk/ChangeLog
trunk/INSTALL
trunk/README
trunk/drbd/drbd_fs.c
trunk/drbd/drbd_proc.c
trunk/drbd/drbd_receiver.c
Log:
some comment, spelling and whitespace fixes. no functional change
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/ChangeLog 2004-08-27 11:53:06 UTC (rev 1511)
@@ -6,7 +6,7 @@
* New config option "wait-sync-target" in the startup section.
When set, the drbd script will block the boot process to prevent
- heatbeat to make a SyncTarget-node primary.
+ heartbeat to make a SyncTarget-node primary.
* prevent possible in-kernel buffer overflow in drbd_proc.c
* Fixed debian's postinst script to create /dev/drbd? instead of /dev/nb?
* drbd status:
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/INSTALL 2004-08-27 11:53:06 UTC (rev 1511)
@@ -112,6 +112,16 @@
number. Having it as module is ok, but you cannot use both
at the same time.
+ If you do not run a selfcompiled kernel, but the binary shipped
+ distro kernel, and after "make install" the drbd module ends up in
+ the wrong place (e.g. "/lib/modules/2.4.20custom/", when you want it
+ in "/lib/modules/2.4.20/" ), edit the top-level Makefile of your kernel
+ source tree and remove "custom" from the EXTRAVERSION. Make sure you
+ copied in the .config corresponding to the kernel you use.
+ Don't forget to "make dep" in /usr/src/linux, it sometimes helps, too.
+ (you could of course edit .kernelversion in the drbd directory,
+ or copy by hand, too)
+
Update:
since we now (0.7.1 and later) have an officially assigned
device major number (147) and device nodes (/dev/drbd), we no longer
@@ -137,7 +147,7 @@
Note: 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.
+ settings appropriately, if not done automagically already.
Since 0.7.3, we have script/adjust_drbd_config_h.sh, which helps you
with this, and gets called during the normal build process,
@@ -239,6 +249,12 @@
file, and you can even "make rpm". If this is a CVS/SVN version,
you might need to say "make rpm FORCE=1".
+ If it does not work for you out of the box, first get "make install"
+ to work properly, see the section titled 'prepare the kernel source tree'
+ and 'building a kernel module'.
+ You may need to add some packages, or edit the drbd.spec(.in) file,
+ or even add a patch if fedora broke something again...
+
There are caveats, please have a look at ./README, too,
you might want/need to edit the ./drbd.spec file.
Modified: trunk/README
===================================================================
--- trunk/README 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/README 2004-08-27 11:53:06 UTC (rev 1511)
@@ -4,19 +4,14 @@
by Philipp Reisner
-Unfortunately my time does not allow me to maintain this README besides
-the software.
-
-Please refer to the web pages at
-http://www.drbd.org/
-to find maintained information.
-
Reference documentation is included in the documentation directory.
+
Please have a look at INSTALL or INSTALL.html, too.
BTW, if there is no INSTALL.html, say "make INSTALL.html" :)
DEBUGING:
+---------
In case you experience kernel crashes when using DRBD, please
define "DBG_ALL_SYMBOLS" in drbd_config.h, and recompile DRBD.
@@ -26,26 +21,19 @@
/usr/src/linux/Documentation/oops-tracing.txt
BUILD RPMS:
+-----------
-It should be enough to just say: make rpm.
-If not, you probably need to add some packages,
-or edit the drbd.spec(.in) file.
+Read INSTALL.
-After make rpm there should be distributable rpms in dist/*/*/drbd-*.*.rpm
+
+GENERAL ISSUES
+--------------
-REDHAT USERS:
+Unfortunately our time does not allow us to
+maintain this README besides the software.
-Have a look into drbd_config.h, and uncomment the RH-specific defines.
+Please refer to the web pages at
+http://www.drbd.org/ and
+http://linuxha.trick.ca/DRBD
+to find maintained information.
-If you do not run a selfcompiled kernel, but the binary shipped
-distro kernel, and after "make install" the drbd module ends up in
-the wrong place (e.g. /lib/modules/2.4.20custom/, when you want it
-in /lib/modules/2.4.20/), edit the top-level Makefile of your
-kernel source tree and remove "custom" from the EXTRAVERSION.
-Make sure you copied in the .config corresponding to the kernel you use.
-Don't forget to "make dep" in /usr/src/linux, it sometimes helps, too.
-
-(you could of course edit .kernelversion in the drbd directory,
- or copy by hand, too)
-
-
Modified: trunk/drbd/drbd_fs.c
===================================================================
--- trunk/drbd/drbd_fs.c 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/drbd/drbd_fs.c 2004-08-27 11:53:06 UTC (rev 1511)
@@ -782,7 +782,7 @@
mdev->this_bdev->bd_disk = mdev->vdisk;
)
- if(test_bit(ON_PRI_INC_HUMAN,&mdev->flags)) {
+ if(test_bit(ON_PRI_INC_HUMAN,&mdev->flags)) {
newstate |= Human;
clear_bit(ON_PRI_INC_HUMAN,&mdev->flags);
}
@@ -1152,10 +1152,14 @@
* differentiate between different error cases,
* or report the current connection state and flags back
* to userspace */
- if( mdev->state == Primary ||
+
+ /* disallow "invalidation" of local replica
+ * when currently in primary state (would be a Bad Idea),
+ * or during a running sync (won't make any sense) */
+ if( mdev->state == Primary ||
mdev->cstate < StandAlone ||
mdev->cstate > Connected ||
- test_bit(DISKLESS,&mdev->flags) ||
+ test_bit(DISKLESS,&mdev->flags) ||
test_bit(PARTNER_DISKLESS,&mdev->flags) ) {
err = -EINPROGRESS;
break;
@@ -1182,7 +1186,7 @@
drbd_md_clear_flag(mdev,MDF_FullSync);
drbd_md_write(mdev);
- if (mdev->cstate == Connected) {
+ if (mdev->cstate == Connected) {
drbd_send_short_cmd(mdev,BecomeSyncSource);
drbd_start_resync(mdev,SyncTarget);
}
@@ -1192,9 +1196,9 @@
break;
case DRBD_IOCTL_INVALIDATE_REM:
- if( mdev->o_state == Primary ||
+ if( mdev->o_state == Primary ||
mdev->cstate != Connected ||
- test_bit(DISKLESS,&mdev->flags) ||
+ test_bit(DISKLESS,&mdev->flags) ||
test_bit(PARTNER_DISKLESS,&mdev->flags) ) {
err = -EINPROGRESS;
break;
Modified: trunk/drbd/drbd_proc.c
===================================================================
--- trunk/drbd/drbd_proc.c 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/drbd/drbd_proc.c 2004-08-27 11:53:06 UTC (rev 1511)
@@ -70,10 +70,12 @@
rs_left = drbd_bm_total_weight(mdev);
/* >> 10 to prevent overflow,
* +1 to prevent division by zero */
- ERR_IF(rs_left > mdev->rs_total) {
+ if (rs_left > mdev->rs_total) {
/* doh. logic bug somewhere.
* for now, just try to prevent in-kernel buffer overflow.
*/
+ ERR("logic bug? rs_left=%lu > rs_total=%lu\n",
+ rs_left, mdev->rs_total);
res = 1000;
} else {
res = (rs_left >> 10)*1000/((mdev->rs_total >> 10) + 1);
Modified: trunk/drbd/drbd_receiver.c
===================================================================
--- trunk/drbd/drbd_receiver.c 2004-08-26 14:43:49 UTC (rev 1510)
+++ trunk/drbd/drbd_receiver.c 2004-08-27 11:53:06 UTC (rev 1511)
@@ -1511,6 +1511,7 @@
nodestate_to_name(oo_state),
nodestate_to_name(mdev->state),
nodestate_to_name(mdev->o_state) );
+ /* FIXME assertion for (gencounts do not diverge) */
}
drbd_md_write(mdev); // update connected indicator, la_size, ...
More information about the drbd-cvs
mailing list