[DRBD-cvs] drbd by lars; -asm/bitops +linux/bitops for ppc to kno...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Tue, 8 Jun 2004 14:04:40 +0200 (CEST)
DRBD CVS committal
Author : lars
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
Makefile-2.4 Makefile-2.6 drbd_dsender.c drbd_main.c
drbd_receiver.c lru_cache.c
Log Message:
-asm/bitops
+linux/bitops for ppc to know about hweight()
* quiten compile warning in got_NegAck
* compile drbd_main.c last, so
#warnings can be placed there, and won't scroll off
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/Makefile-2.4,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- Makefile-2.4 20 Apr 2004 11:36:53 -0000 1.1.2.1
+++ Makefile-2.4 8 Jun 2004 12:04:35 -0000 1.1.2.2
@@ -1,6 +1,6 @@
-drbd-objs := drbd_fs.o drbd_main.o drbd_proc.o drbd_dsender.o \
+drbd-objs := drbd_fs.o drbd_proc.o drbd_dsender.o \
drbd_receiver.o drbd_req-2.4.o drbd_actlog.o \
- lru_cache.o mempool-2.4.o
+ lru_cache.o mempool-2.4.o drbd_main.o
obj-$(CONFIG_BLK_DEV_DRBD) += drbd.o
list-multi := drbd.o
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/Makefile-2.6,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- Makefile-2.6 20 Apr 2004 11:36:53 -0000 1.1.2.1
+++ Makefile-2.6 8 Jun 2004 12:04:35 -0000 1.1.2.2
@@ -1,4 +1,4 @@
-drbd-objs := drbd_fs.o drbd_main.o drbd_proc.o drbd_dsender.o \
+drbd-objs := drbd_fs.o drbd_proc.o drbd_dsender.o \
drbd_receiver.o drbd_req-2.4.o drbd_actlog.o \
- lru_cache.o
+ lru_cache.o drbd_main.o
obj-$(CONFIG_BLK_DEV_DRBD) += drbd.o
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_dsender.c,v
retrieving revision 1.1.2.117
retrieving revision 1.1.2.118
diff -u -3 -r1.1.2.117 -r1.1.2.118
--- drbd_dsender.c 1 Jun 2004 14:29:06 -0000 1.1.2.117
+++ drbd_dsender.c 8 Jun 2004 12:04:35 -0000 1.1.2.118
@@ -30,7 +30,7 @@
#include <linux/config.h>
#include <linux/module.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/wait.h>
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.183
retrieving revision 1.73.2.184
diff -u -3 -r1.73.2.183 -r1.73.2.184
--- drbd_main.c 1 Jun 2004 14:29:07 -0000 1.73.2.183
+++ drbd_main.c 8 Jun 2004 12:04:35 -0000 1.73.2.184
@@ -37,9 +37,9 @@
#include <linux/module.h>
#include <asm/uaccess.h>
-#include <asm/bitops.h>
#include <asm/types.h>
#include <net/sock.h>
+#include <linux/bitops.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
#include <linux/file.h>
@@ -54,6 +54,18 @@
#include <linux/drbd.h>
#include "drbd_int.h"
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+# warning "----------------------------------------"
+# warning " NOTE 2.4 compatibility is untested. "
+# warning " it compiles, it may even work. "
+# warning " but it may also oops at you. and if it "
+# warning " does oops at you right away, let us "
+# warning " know, but don't expect a fix too soon, "
+# warning " as primary target is 2.6 now. "
+# warning " If it works for you, let us know, too. "
+# warning "----------------------------------------"
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
# if defined(CONFIG_PPC64) || defined(CONFIG_SPARC64) || defined(CONFIG_X86_64)
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.168
retrieving revision 1.97.2.169
diff -u -3 -r1.97.2.168 -r1.97.2.169
--- drbd_receiver.c 7 Jun 2004 14:05:05 -0000 1.97.2.168
+++ drbd_receiver.c 8 Jun 2004 12:04:35 -0000 1.97.2.169
@@ -1712,18 +1712,15 @@
STATIC int got_NegAck(drbd_dev *mdev, Drbd_Header* h)
{
+#if 0
Drbd_BlockAck_Packet *p = (Drbd_BlockAck_Packet*)h;
sector_t sector = be64_to_cpu(p->sector);
int size = be32_to_cpu(p->blksize);
- if (DRBD_ratelimit(5*HZ,5))
- WARN("Got NegAck packet. Peer is in troubles?\n");
-
/* do nothing here.
* we expect to get a "report param" on the data socket soon,
* and will do the cleanup then and there.
*/
-#if 0
if(is_syncer_blk(mdev,p->block_id)) {
dec_rs_pending(mdev,HERE);
} else {
@@ -1733,6 +1730,9 @@
dec_ap_pending(mdev,HERE);
}
#endif
+ if (DRBD_ratelimit(5*HZ,5))
+ WARN("Got NegAck packet. Peer is in troubles?\n");
+
return TRUE;
}
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/lru_cache.c,v
retrieving revision 1.1.2.26
retrieving revision 1.1.2.27
diff -u -3 -r1.1.2.26 -r1.1.2.27
--- lru_cache.c 19 May 2004 19:52:47 -0000 1.1.2.26
+++ lru_cache.c 8 Jun 2004 12:04:35 -0000 1.1.2.27
@@ -26,7 +26,7 @@
#include <linux/bitops.h>
#include <linux/vmalloc.h>
-#include <asm/string.h>
+#include <linux/string.h> // for memset
#include "lru_cache.h"
#define STATIC static