Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197512
b: refs/heads/master
c: be6800a
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed May 18, 2010
1 parent 52ca884 commit d95498c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8707c08f4f718bb0ed65499d3f43201f6e41455
refs/heads/master: be6800a73aa2f3dc14744c3b80e676d189789f04
19 changes: 13 additions & 6 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,10 +1070,13 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
mddev->bitmap_info.default_offset;

} else if (mddev->pers == NULL) {
/* Insist on good event counter while assembling */
/* Insist on good event counter while assembling, except
* for spares (which don't need an event count) */
++ev1;
if (ev1 < mddev->events)
return -EINVAL;
if (sb->disks[rdev->desc_nr].state & (
(1<<MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE)))
if (ev1 < mddev->events)
return -EINVAL;
} else if (mddev->bitmap) {
/* if adding to array with a bitmap, then we can accept an
* older device ... but not too old.
Expand Down Expand Up @@ -1469,10 +1472,14 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
}

} else if (mddev->pers == NULL) {
/* Insist of good event counter while assembling */
/* Insist of good event counter while assembling, except for
* spares (which don't need an event count) */
++ev1;
if (ev1 < mddev->events)
return -EINVAL;
if (rdev->desc_nr >= 0 &&
rdev->desc_nr < le32_to_cpu(sb->max_dev) &&
le16_to_cpu(sb->dev_roles[rdev->desc_nr]) < 0xfffe)
if (ev1 < mddev->events)
return -EINVAL;
} else if (mddev->bitmap) {
/* If adding to array with a bitmap, then we can accept an
* older device, but not too old.
Expand Down

0 comments on commit d95498c

Please sign in to comment.