提交 d1d4bb9c 编写于 作者: L Linus Torvalds

Merge tag 'md-3.6-fixes' of git://neil.brown.name/md

Pull two md bugfixes from NeilBrown:
 "One (missing spinlock init) was only introduced recently.  The other
  has been present as long as raid10 has been supported, so is tagged
  for -stable."

* tag 'md-3.6-fixes' of git://neil.brown.name/md:
  md/raid10: fix "enough" function for detecting if array is failed.
  md/raid5: add missing spin_lock_init.
...@@ -1512,14 +1512,16 @@ static int _enough(struct r10conf *conf, struct geom *geo, int ignore) ...@@ -1512,14 +1512,16 @@ static int _enough(struct r10conf *conf, struct geom *geo, int ignore)
do { do {
int n = conf->copies; int n = conf->copies;
int cnt = 0; int cnt = 0;
int this = first;
while (n--) { while (n--) {
if (conf->mirrors[first].rdev && if (conf->mirrors[this].rdev &&
first != ignore) this != ignore)
cnt++; cnt++;
first = (first+1) % geo->raid_disks; this = (this+1) % geo->raid_disks;
} }
if (cnt == 0) if (cnt == 0)
return 0; return 0;
first = (first + geo->near_copies) % geo->raid_disks;
} while (first != 0); } while (first != 0);
return 1; return 1;
} }
......
...@@ -1591,6 +1591,7 @@ static int resize_stripes(struct r5conf *conf, int newsize) ...@@ -1591,6 +1591,7 @@ static int resize_stripes(struct r5conf *conf, int newsize)
#ifdef CONFIG_MULTICORE_RAID456 #ifdef CONFIG_MULTICORE_RAID456
init_waitqueue_head(&nsh->ops.wait_for_ops); init_waitqueue_head(&nsh->ops.wait_for_ops);
#endif #endif
spin_lock_init(&nsh->stripe_lock);
list_add(&nsh->lru, &newstripes); list_add(&nsh->lru, &newstripes);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册