Neil Brown wrote: > > On Wednesday April 23, Paul.Clements@SteelEye.com wrote: > > Neil Brown wrote: > It is possible for an array to be half-assembled. To have some drives > attached, but not to have been started. > This can happen (for example) if you use mdadm to assemble a raid5 > array without given all of the drives, and without giving --run. > > In this case you don't want 'md' to be unloaded, but you haven't > loaded a personality module yet. So you need to take a reference to > the md module whenever you start putting an md array together. Ah...I had missed that...appears that was an existing problem, even with the MOD_INC_USE_COUNT in place. So we need to do the ref counting at bind/unbind time, rather than activation/deactivation time. So here's the patch...compiled and tested briefly against 2.5.68-bklatest, the ref counting looks correct -- Paul