[DRBD-cvs] drbd by phil; * Added missing closing brace drbd_int.h...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Wed, 16 Jun 2004 12:00:48 +0200 (CEST)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_bitmap.c drbd_int.h
Log Message:
* Added missing closing brace drbd_int.h
* Fixed a spinlock deadlock...
NMI Watchdog detected LOCKUP on CPU1, eip d08f3e93, registers:
CPU: 1
EIP: 0060:[<d08f3e93>] Not tainted
EFLAGS: 00000086 (2.6.6)
EIP is at .text.lock.drbd_actlog+0x29/0xf6 [drbd]
eax: ce83c000 ebx: c8f9e560 ecx: c8f9e92c edx: c8f9e600
esi: c8f9ea98 edi: 00000007 ebp: 000000a0 esp: ce83dcd0
ds: 007b es: 007b ss: 0068
Process drbd1_asender (pid: 16762, threadinfo=ce83c000 task=ca94a890)
Stack: 001410b8 c8f9e560 cf82bb9c 00000000 d08e8856 c8f9e560 001410b8 cf82bb9c
00000020 00000001 001410b8 cf82bbb8 00000000 cf7f865c 00000000 c015eead
cf82bbb8 00001000 00000000 00000000 cca9b624 c0293bd8 cf82bbb8 00001000
Call Trace:
[<d08e8856>] drbd_dio_end+0x182/0x1f4 [drbd]
[<c015eead>] bio_endio+0x4d/0x54
[<c0293bd8>] clone_endio+0xbc/0xe4
[<c015eead>] bio_endio+0x4d/0x54
[<c02397df>] __end_that_request_first+0xef/0x1dc
[<c02398e3>] end_that_request_first+0x17/0x1c
[<c025afc6>] ide_end_request+0xc6/0x18c
[<c025a59c>] default_end_request+0x14/0x18
[<c0262e99>] ide_dma_intr+0x61/0x98
[<c025c7a2>] ide_intr+0x206/0x2d8
[<c0262e38>] ide_dma_intr+0x0/0x98
[<c0107f41>] handle_IRQ_event+0x2d/0x54
[<c0108365>] do_IRQ+0xed/0x1c8
[<c010692c>] common_interrupt+0x18/0x20
[<c02a9053>] net_rx_action+0x63/0x128
[<c012439e>] __do_softirq+0x4e/0xa4
[<c012441c>] do_softirq+0x28/0x30
[<c0108426>] do_IRQ+0x1ae/0x1c8
[<c010692c>] common_interrupt+0x18/0x20
[<d08f007b>] drbd_asender+0xf/0x44f [drbd]
[<d08e50c9>] drbd_bm_e_weight+0x221/0x244 [drbd]
[<d08f301f>] drbd_try_clear_on_disk_bm+0x93/0x248 [drbd]
[<d08f3408>] drbd_set_in_sync+0x234/0x298 [drbd]
[<d08efc8f>] got_BlockAck+0xbb/0x1a0 [drbd]
[<d08f0302>] drbd_asender+0x296/0x44f [drbd]
[<d08f4fc0>] drbd_thread_setup+0x94/0x108 [drbd]
[<d08f4f2c>] drbd_thread_setup+0x0/0x108 [drbd]
[<c0104255>] kernel_thread_helper+0x5/0xc
Code: 7e f9 e9 1b de ff ff e8 d9 40 a2 ef e9 44 df ff ff e8 f3 40
console shuts up ...
drbd_set_in_sync()
spin_lock_irq()
+-> try_clearn_on_disk_bm()
+-> drbd_bm_e_weight()
spin_lock_irq()
spin_unlock_irq()
<-> Interrupt comes in....
Need to use irqsave/irqrestore in drbd_bm_e_weight()
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/drbd_bitmap.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -3 -r1.1.2.2 -r1.1.2.3
--- drbd_bitmap.c 15 Jun 2004 13:42:29 -0000 1.1.2.2
+++ drbd_bitmap.c 16 Jun 2004 10:00:43 -0000 1.1.2.3
@@ -727,9 +727,10 @@
{
struct drbd_bitmap *b = mdev->bitmap;
int count, s, e;
+ unsigned long flags;
D_BUG_ON(!(b && b->bm));
- spin_lock_irq(&b->bm_lock);
+ spin_lock_irqsave(&b->bm_lock,flags);
BM_PARANOIA_CHECK();
s = S2W(enr);
@@ -742,7 +743,7 @@
} else {
D_ASSERT(0);
}
- spin_unlock_irq(&b->bm_lock);
+ spin_unlock_irqrestore(&b->bm_lock,flags);
#if DUMP_MD >= 3
INFO("enr=%lu weight=%d e=%d s=%d\n", enr, count, e, s);
#endif
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_int.h,v
retrieving revision 1.58.2.173
retrieving revision 1.58.2.174
diff -u -3 -r1.58.2.173 -r1.58.2.174
--- drbd_int.h 16 Jun 2004 08:40:37 -0000 1.58.2.173
+++ drbd_int.h 16 Jun 2004 10:00:43 -0000 1.58.2.174
@@ -854,7 +854,7 @@
#define BM_SECT_TO_EXT(x) ((x)>>(BM_EXT_SIZE_B-9))
/* in one sector of the bitmap, we have this many activity_log extents. */
-#define AL_EXT_PER_BM_SECT (1 << (BM_EXT_SIZE_B - AL_EXTENT_SIZE_B)
+#define AL_EXT_PER_BM_SECT (1 << (BM_EXT_SIZE_B - AL_EXTENT_SIZE_B) )
/* I want the packet to fit within one page