mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
When a rebuild is done, properly mark the arrays as functional again.
This commit is contained in:
parent
3d5c30f7c2
commit
46917bb6f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145329
@ -690,8 +690,24 @@ ata_raid_done(struct ata_request *request)
|
||||
printf("ar%d: unknown array type in ata_raid_done\n", rdp->lun);
|
||||
}
|
||||
|
||||
if (finished)
|
||||
if (finished) {
|
||||
if ((rdp->status & AR_S_REBUILDING) &&
|
||||
rdp->rebuild_lba >= rdp->total_sectors) {
|
||||
int disk;
|
||||
|
||||
for (disk = 0; disk < rdp->total_disks; disk++) {
|
||||
if ((rdp->disks[disk].flags &
|
||||
(AR_DF_PRESENT | AR_DF_ASSIGNED | AR_DF_SPARE)) ==
|
||||
(AR_DF_PRESENT | AR_DF_ASSIGNED | AR_DF_SPARE)) {
|
||||
rdp->disks[disk].flags &= ~AR_DF_SPARE;
|
||||
rdp->disks[disk].flags |= AR_DF_ONLINE;
|
||||
}
|
||||
}
|
||||
rdp->status &= ~AR_S_REBUILDING;
|
||||
ata_raid_config_changed(rdp, 1);
|
||||
}
|
||||
biodone(bp);
|
||||
}
|
||||
|
||||
if (composite) {
|
||||
if (finished) {
|
||||
|
Loading…
Reference in New Issue
Block a user