]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
RAID5: revert e9e4c377e2f563 to fix a livelock
authorShaohua Li <shli@fb.com>
Fri, 26 Feb 2016 00:24:42 +0000 (16:24 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 12:53:18 +0000 (06:53 -0600)
commitc160a6dfbc6ab5122934d133cdb92ea64413726a
treeed964f59671dced81f45a2ba1c8ca29da70051bb
parent9046b6192b0717a0694ca20cebb327a7b2b48dd3
RAID5: revert e9e4c377e2f563 to fix a livelock

BugLink: http://bugs.launchpad.net/bugs/1572722
commit 6ab2a4b806ae21b6c3e47c5ff1285ec06d505325 upstream.

Revert commit
e9e4c377e2f563(md/raid5: per hash value and exclusive wait_for_stripe)

The problem is raid5_get_active_stripe waits on
conf->wait_for_stripe[hash]. Assume hash is 0. My test release stripes
in this order:
- release all stripes with hash 0
- raid5_get_active_stripe still sleeps since active_stripes >
  max_nr_stripes * 3 / 4
- release all stripes with hash other than 0. active_stripes becomes 0
- raid5_get_active_stripe still sleeps, since nobody wakes up
  wait_for_stripe[0]
The system live locks. The problem is active_stripes isn't a per-hash
count. Revert the patch makes the live lock go away.

Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/md/raid5.c
drivers/md/raid5.h