[PATCH] raid locking fix.
From: Neil Brown <neilb@cse.unsw.edu.au> Fix bug #2661 Raid currently calls ->unplug_fn under spin_lock_irqsave(), but unplug_fns can sleep. After a morning of scratching my head and trying to come up with some that does less locking, the following is the best I can come up with. I'm not proud of it but it should work. If I move "nr_pending" out or rdev into the per-personality structures (e.g. mirror_info), and if I had "atomic_inc_if_nonzero" I could do with without locking so much, but random atomic* functions don't seem trivial
Showing
Please register or sign in to comment