The following patch addresses several critical problems in the raid1 driver. Please apply. We've tested these patches pretty thoroughly against the 2.4.9-21 Red Hat kernel. The source for raid1 is nearly identical from 2.4.9-21 to 2.4.18. The patch is against 2.4.18. If you have any questions, concerns, or comments, please send them to me. Thanks, Paul -- Paul Clements SteelEye Technology Paul.Clements@SteelEye.com -- The problems are, briefly: 1) overuse of device_lock spin lock The device_lock was being used for two separate, unrelated purposes. This was causing too much contention and caused a deadlock in one case. The device_lock will be split into two separate locks by introducing a new spin lock, "memory_lock". 2) non-atomic memory allocation Due to use of GFP_KERNEL rather than GFP_ATOMIC, certain threads of the raid1 driver were scheduled out while holding a spin lock, causing a deadlock to occur. Memory allocation during critical sections where a spin lock is held will be changed to atomic allocations. 3) incorrect enabling/disabling of interrupts during locking In several cases, the wrong spin_lock* macros were being used. There were a few cases where the irqsave/irqrestore versions of the macros were needed, but were not used. The symptom of these problems was that interrupts were enabled or disabled at inappropriate times, resulting in deadlocks. 4) incorrect setting of conf->cnt_future and conf->phase resync counters The symptoms of this problem were that, if I/O was occurring when a resync ended (or was aborted), the resync would hang and never complete. This eventually would cause all I/O to the md device to hang.