Bug 28652
Summary: | Hang-ups and various DOS started by accessing partition of non-existent partitionable RAID array | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | hkmaly |
Component: | MD | Assignee: | Neil Brown (neilb) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | akpm, florian, neilb |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.30,2.6.32 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
hkmaly
2011-02-08 22:39:37 UTC
Note that acording to strace the hang up is immediately on open ... fsck /dev/md_d1p1 will cause same problems (and in fact I've just found out that the fsck originally started that). md_open is repeatedly returning ERESTARTSYS which is causing an endless loop. Don't know why yet - but I thought I would let you know I was looking. Thanks. This patch appears to fix the problem for me. If you are in a position to test and confirm I would appreciate. However I am fairly confident and will send it upstream shortly. Thanks. diff --git a/drivers/md/md.c b/drivers/md/md.c index 0cc30ec..1d87668 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -553,6 +553,9 @@ static mddev_t * mddev_find(dev_t unit) { mddev_t *mddev, *new = NULL; + if (unit && MAJOR(unit) != MD_MAJOR) + unit &= ~((1<<MdpMinorShift)-1); + retry: spin_lock(&all_mddevs_lock); merged for .38-rc7: commit 8f5f02c460b7ca74ce55ce126ce0c1e58a3f923d Author: NeilBrown <neilb@suse.de> Date: Wed Feb 16 13:58:51 2011 +1100 md: correctly handle probe of an 'mdp' device. |