diff options
Diffstat (limited to 'sys/geom/raid/md_jmicron.c')
-rw-r--r-- | sys/geom/raid/md_jmicron.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/geom/raid/md_jmicron.c b/sys/geom/raid/md_jmicron.c index a56c543..ef6dcb3 100644 --- a/sys/geom/raid/md_jmicron.c +++ b/sys/geom/raid/md_jmicron.c @@ -431,7 +431,10 @@ g_raid_md_jmicron_start_disk(struct g_raid_disk *disk) olddisk = NULL; /* Find disk position in metadata by it's serial. */ - disk_pos = jmicron_meta_find_disk(meta, pd->pd_disk_id); + if (pd->pd_meta != NULL) + disk_pos = jmicron_meta_find_disk(meta, pd->pd_disk_id); + else + disk_pos = -1; if (disk_pos < 0) { G_RAID_DEBUG1(1, sc, "Unknown, probably new or stale disk"); /* If we are in the start process, that's all for now. */ @@ -522,7 +525,7 @@ nofit: * Different disks may have different sizes/offsets, * especially in concat mode. Update. */ - if (pd->pd_meta != NULL && !resurrection) { + if (!resurrection) { sd->sd_offset = (off_t)pd->pd_meta->offset * 16 * 512; //ZZZ sd->sd_size = @@ -1300,10 +1303,8 @@ g_raid_md_ctl_jmicron(struct g_raid_md_object *md, /* If disk was assigned, just update statuses. */ if (pd->pd_disk_pos >= 0) { g_raid_change_disk_state(disk, G_RAID_DISK_S_OFFLINE); - if (disk->d_consumer) { - g_raid_kill_consumer(sc, disk->d_consumer); - disk->d_consumer = NULL; - } + g_raid_kill_consumer(sc, disk->d_consumer); + disk->d_consumer = NULL; TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) { g_raid_change_subdisk_state(sd, G_RAID_SUBDISK_S_NONE); |