On Friday December 9, [EMAIL PROTECTED] wrote:
> Hi,
> 
> After i get this on one of my disk node, imediately send this letter, and go
> to the hosting company, to see, is any message on the screen.
> But unfortunately nothing what i found.
> simple freeze.
> no message, no ping, no num lock!
> 
> The full message of  the node next reboot is here:
> http://download.netcenter.hu/bughunt/20051209/boot.log

Ahh.... Ok, I know the problem.
I had originally only tested bitmaps for raid5 and raid6 on a
single-processor machine.  When you try it on an SMP machine you get a
deadlock.
The following patch - which will be in 2.6.15 - fixes the problem.

Thanks for your testing.

NeilBrown

-------------------------------
Fix locking problem in r5/r6

bitmap_unplug actually writes data (bits) to storage, so we
shouldn't be holding a spinlock...

Signed-off-by: Neil Brown <[EMAIL PROTECTED]>

### Diffstat output
 ./drivers/md/raid5.c     |    2 ++
 ./drivers/md/raid6main.c |    2 ++
 2 files changed, 4 insertions(+)

diff ./drivers/md/raid5.c~current~ ./drivers/md/raid5.c
--- ./drivers/md/raid5.c        2005-12-06 11:06:53.000000000 +1100
+++ ./drivers/md/raid5.c~current~       2005-12-06 11:07:10.000000000 +1100
@@ -1704,7 +1704,9 @@ static void raid5d (mddev_t *mddev)
 
                if (conf->seq_flush - conf->seq_write > 0) {
                        int seq = conf->seq_flush;
+                       spin_unlock_irq(&conf->device_lock);
                        bitmap_unplug(mddev->bitmap);
+                       spin_lock_irq(&conf->device_lock);
                        conf->seq_write = seq;
                        activate_bit_delay(conf);
                }

diff ./drivers/md/raid6main.c~current~ ./drivers/md/raid6main.c
--- ./drivers/md/raid6main.c    2005-12-06 11:06:53.000000000 +1100
+++ ./drivers/md/raid6main.c~current~   2005-12-06 11:07:10.000000000 +1100
@@ -1784,7 +1784,9 @@ static void raid6d (mddev_t *mddev)
 
                if (conf->seq_flush - conf->seq_write > 0) {
                        int seq = conf->seq_flush;
+                       spin_unlock_irq(&conf->device_lock);
                        bitmap_unplug(mddev->bitmap);
+                       spin_lock_irq(&conf->device_lock);
                        conf->seq_write = seq;
                        activate_bit_delay(conf);
                }
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to